Jump to: navigation, search

Changes


EvalExpression

1,204 bytes added, 08:37, 18 January 2021
/* Simple Calculation */
<tab name="Xamarin">
None available yet<source lang = "xml"><StackLayout xmlns:ctrls="using:UBIK.WinX.Controls" HorizontalAlignment="Center" Orientation="Vertical"> <Editor x:Name="Expression" Width="200" /> <Editor x:Name="Param0" Width="200" /> <Editor x:Name="Param1" Width="200" /> <ctrls:EvalExpression x:Name="Evaluator" Expression="{Binding ElementName=Expression, Path=Text}"> <ctrls:EvalExpressionParameter Name="P0" Value="{Binding ElementName=Param0, Path=Text, Converter={StaticResource ToType}, ConverterParameter='System.Int32'}" /> <ctrls:EvalExpressionParameter Name="P1" Value="{Binding ElementName=Param1, Path=Text, Converter={StaticResource ToType}, ConverterParameter='System.Int32'}" /> <ctrls:EvalExpressionParameter Name="P2" Value="{Binding IsLoggedIn}" /> </ctrls:EvalExpression> <Entry Text="{Binding ElementName=Evaluator, Path=Result}" /></StackLayout></source>Lets assume that the Textbox ''Param0'' contains a text of 42 and ''Param1'' contains a text of 43. If ''Expression'' now contains <code>(P0 + P1) *2</code> then the result would display 170.</tab>
</tabs>
 
[[Category:Client|EvalExpression]]
[[Category:Pages with broken file links|EvalExpression]]
[[Category:WinX|EvalExpression]]
[[Category:Xamarin|EvalExpression]]
==== Setting a calculated Property Value ====