Jump to: navigation, search

Changes


HowTo:Implement Custom Filtering

634 bytes added, 05:57, 25 April 2023
/* EvalExpression */
Here is the final XAML [[EvalExpression]] solution:
<tabs>
<tab name="UWP">
<source lang = "xml">
<controls:EvalExpression x:Name="FilterExpression"
</controls:EvalExpression>
</source>
</tab>
<tab name="Xamarin">
<source lang = "xml">
<controls:EvalExpression x:Key="Evaluator" Expression="(P1==null||P1==&quot;&quot;)?&quot;true&quot;:P0" Context="{Binding}">
<controls:EvalExpressionParameter Name="P0" Value="{Binding Path=Text, Source={x:Reference Filter_Input}, Converter={StaticResource Formatter}, ConverterParameter='Item.Values[&quot;NAME&quot;].ToLower().Contains(&quot;{0}&quot;.ToLower())==true'}" />
<controls:EvalExpressionParameter Name="P1" Value="{Binding Path=Text, Source={x:Reference Filter_Input}}" />
</controls:EvalExpression>
</source>
</tab>
</tabs>
The best solution would be to place this eval expression into the <Grid.Resources>.
xmlns:controls="using:UBIK.WinX.Controls"
</source>
 
== [[XAML_Changes_in_UBIK_WinX_3.5#Filtering_by_expressions|ListCollectionView]] ==
89
edits