Changes

EvalExpression

772 bytes added, 10:32, 4 October 2019
/* Examples */
=== Examples ===
 
==== Evaluation without parameters ====
The following example shows how to evaluate a simple expression without using any parameters and then use the result for visibility binding.
 
<source lang = "xml">
<StackPanel xmlns:ctrls="using:UBIK.WinX.Controls">
<ctrls:EvalExpression
x:Name="ExpressionEvaluator"
Context="{Binding}"
Expression="Context.Values[&quot;LK_OFFLINE&quot;]!=null || Context.Values[&quot;GUIDREF&quot;]!=null" />
<TextBlock Foreground="White" Visibility="{Binding ElementName=ExpressionEvaluator, Path=Result, Converter={StaticResource BoolToVisConverter}}" />
</StackPanel>
</source>
 
The TextBlock should be visibile as long as at least one of the context object's two named properties has a value.
==== Simple Calculation ====