Changes
The Filter Guid Editing is based on three four different xaml parts:
* Input field
* EvalExpression
* ListCollectionView * ListView <br>
<br>
With this Filter, we are able to filter in a Guid Editor dynamically without using any evaluate button or something, you just input a value that you want to filter with and it will directly output you any item that contains the filter input.
== Input field ==
The input field is just a basic Textbox we are gonna using for inputting the filter criteria value. <br>
<br>
It will look like this:
<source lang = "xml">
<Grid>
<!-- Type / Content / Buttons -->
<Grid.ColumnDefinitions>
<TextBlock Margin="0,0,0,0"
Grid.Column="0" Style="{StaticResource UBIKTextStyle}">
<Run Text="Name:"/>
</TextBlock>
<TextBox x:Name="InputTextboxName"
Grid.Column="1"
Margin="0,0,0,0" Style="{StaticResource UBIKTextBoxStyle}">
</TextBox>
</Grid>
The best solution would be to place this eval expression into the <Grid.Resources>.
Used namespace:
<source lang = "xml">
xmlns:controls="using:UBIK.WinX.Controls"
</source>
== [[XAML_Changes_in_UBIK_WinX_3.5#Filtering_by_expressions|ListCollectionView]] ==
<cv:ListCollectionView x:Key="FilterView"
Expression="{Binding ElementName=FilterExpression, Path=Result}"
ItemsSource="{Binding PropertyViewModel.FilterQueryResults.Items, Converter={StaticResource CollectionTruncateConverter}, ConverterParameter=200}"}" /></source>For the ItemsSource the original source can be any list of objects like Children.Items. Used namespace:<source lang = "xml">xmlns:cv="using:UBIK.WinX.UI.CollectionView"</source> == ListView control ==The ListView is for using the filtered results, in this example a SelectionBoundListView is used but could also be any other control list view.<source lang = "xml">controls:SelectionBoundListView x:Name="FilterQueryList" ItemTemplate="{Binding PropertyViewModel.TemplateService[UBIKInlineQueryResultItem]}" ItemsSource="{StaticResource FilterView}" SelectedValue="{Binding PropertyValue}" SelectedValuePath="UID" SelectionMode="Single"> </controls:SelectionBoundListView>
</source>