Jump to: navigation, search

Changes


EvalExpression

48 bytes removed, 11:45, 25 January 2021
/* Simple Calculation */
<source lang = "xml">
<StackLayout xmlns:ctrls="clr-namespace:UBIK.CPL.Controls;assembly=UBIK.CPL">
<Editor x:Name="Expression" Width="200" /> <Editor x:Name="Param0" Width="20032" /> <Editor x:Name="Param1" Width="20043" /> <ctrls:EvalExpression x:Name="Evaluator" Expression="{Binding ElementNamePath=ExpressionText, PathSource=Text{x:Reference Expression}}"> <ctrls:EvalExpressionParameter Name="P0" Value="{Binding ElementName=Param0, Path=TextWidth, ConverterSource={StaticResource ToTypex:Reference Param0}, ConverterParameter='System.Int32'}" /> <ctrls:EvalExpressionParameter Name="P1" Value="{Binding ElementName=Param1, Path=TextWidth, ConverterSource={StaticResource ToTypex:Reference Param1}, ConverterParameter='System.Int32'}" /> <ctrls:EvalExpressionParameter Name="P2" Value="{Binding IsLoggedIn}" />
</ctrls:EvalExpression>
<Label Text="{Binding ElementName=Evaluator, Path=Result, Source={x:Reference Evaluator}}" />
</StackLayout>
</source>
Lets assume that the Textbox ''Param0'' contains has a text width of 42 32 and ''Param1'' contains has a text width of 43. If ''Expression'' now contains <code>(P0 + P1) *2</code> then the result would display 17075.</tab>
</tabs>
[[Category:Client|EvalExpression]][[Category:Pages with broken file links|EvalExpression]][[Category:WinX|EvalExpression]][[Category:Xamarin|EvalExpression]]
==== Setting a calculated Property Value ====