Changes
| version = 3.2+ in UBIK.UWP 1.0+ in UBIK.Xamarin
}}
== Concept ==
<TextBlock
Foreground="White"
Text="Some Text"
Visibility="{Binding ElementName=Evaluator, Path=Result, Converter={StaticResource BoolToVisConverter}}" />
</StackPanel>
</tab>
</tabs>
==== Setting a calculated property value ====
<source lang = "xml">
<Grid xmlns:ctrls="using:UBIK.WinX.Controls">
<ctrls:EvalExpression x:Name="Evaluator" Expression="P0 Condi == true ? P00 P0 : (P1 == true ? P10)" Context="{Binding}"> <ctrls:EvalExpressionParameter Name="P0Condi" Value="{Binding Values[MP_PP_STATUS], Converter={StaticResource EqualToVisConverterEqualToTrueConverter}, ConverterParameter=10}" /> <ctrls:EvalExpressionParameter Name="P00P0" Value="State1" /> <ctrls:EvalExpressionParameter Name="P1" Value="{Binding Values[MP_PP_STATUS], Converter={StaticResource EqualToVisConverter}, ConverterParameter=20}" /> <ctrls:EvalExpressionParameter Name="P00" Value="State2" />
<TextBlock Text="{Binding ElementName=Evaluator, Path=Result}" />
</ctrls:EvalExpression>
<source lang = "xml">
<Grid xmlns:ctrls="clr-namespace:UBIK.CPL.Controls;assembly=UBIK.CPL">
<controls:EvalExpression x:Name="Evaluator" Expression="P0 Condi == true ? P00 P0 : (P1 == true ? P10)" Context="{Binding}"> <controls:EvalExpressionParameter Name="P0Condi" Value="{Binding Values[MP_STATUS], Converter={StaticResource EqualityToBool}, ConverterParameter=0}" /> <controls:EvalExpressionParameter Name="P00P0" 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 Evaluator}}" />
</tab>
</tabs>
==See also==