Jump to: navigation, search

Changes


XAML

1,213 bytes removed, 12:00, 9 April 2021
/* Advanced */
* [[CollectionToViewConverter]]
Converts a collection into a view that can be filtered using C# expressions Outdated and returns replaced by the (filtered) result[[XAML_Changes_in_UBIK_WinX_3. The object fed into the converter can be referenced in the expression as ''Item''5#Filtering_by_expressions|ListCollectionView]]Example:<source lang = "xml"> <Grid> <Grid.Resources> <!-- Instantiate the converter and bind the Source to the collection we want to use on a UI element of this page --> <converters:CollectionToViewConverter x:Key="ColConv" Source="{Binding Children.Items}" /> </Grid.Resources> <StackPanel Orientation="Horizontal"> <!-- Create a TextBox where we can enter a C# expression --> <TextBox x:Name="FilterQuery" Height="40" MinWidth="240" Margin="0,10,10,0" HorizontalAlignment="Right" VerticalAlignment="Top" FontSize="18" PlaceholderText="Filter" /> <!-- Create a ListView and bind its ItemsSource to the expression pulled through the converter --> <ListView x:Name="ChildListView" HorizontalContentAlignment="Stretch" ItemsSource="{Binding ElementName=FilterQuery, Path=Text, Converter={StaticResource ColConv}}"> </ListView> </StackPanel> </Grid></source>
</source>
[[Category:WinX|XAML]]
[[Category:XAML|XAML]]
== Properties ==