Jump to: navigation, search

Changes


EvalExpression

57 bytes removed, 10:19, 25 January 2021
/* Conditional Statement */
In this case, if the result of the P0 expression is true P00 will be used, if P1 is true P10 will be used.
<source lang = "xml">
<Grid xmlns:ctrls="clr-namespace:UBIK.CPL.Controls;assembly=UBIK.CPL"> <controls:EvalExpression x:Name="StatusAutomator" Expression="P0 == true ? P00 : (P1 == true ? P10)" Context="{Binding}"> <controls:EvalExpressionParameter Name="P0" Value="{Binding Values[MP_STATUS], Converter={StaticResource EqualityToBool}, ConverterParameter=0}" /> <controls:EvalExpressionParameter Name="P00" Value="State1" /> <controls:EvalExpressionParameter Name="P1" Value="{Binding Values[MP_STATUS], Converter={StaticResource EqualityToBool}, ConverterParameter=10}" /> <controls:EvalExpressionParameter Name="P10" Value="State2" /> </controls:EvalExpression> <Label Text="{Binding Path=Result, Source={x:Reference StatusAutomator}}" FontSize="16"/> </Grid></source> 
</tab>
</tabs>