Jump to: navigation, search

Changes


Property Based Content Sorting

1,305 bytes added, 10:44, 11 November 2020
{{Category/Version|2.6.1}}
== Collection View sorting : UWP==
This functionality is documented in more detail on the wiki page [[Version 3.6 (WinX)]].
 
{{Alert| This only works for UWP! The section below shows how to achieve list sorting on Xamarin.}}
There is the possibility to sort at the point where you define your Collection View. This is especially useful for sorting Selective List items! An example is as follows:
{{Hint|This example can be found in the Lonza customising.}}
 
== ListView sorting: Xamarin ==
DataSource sorting works out of the box with SFListView! An example is as follows:
 
<source lang = "xml">
xmlns:sync="clr-namespace:Syncfusion.ListView.XForms;assembly=Syncfusion.SfListView.XForms"
xmlns:dataSource="clr-namespace:Syncfusion.DataSource;assembly=Syncfusion.DataSource.Portable"
 
<sync:SfListView
IsVisible="{Binding ShowComboBox}"
ItemsSource="{Binding PropertyItem, Mode=OneWay, Converter={StaticResource SelectiveListToItems}}"
SelectedItem="{Binding PropertyValue, Mode=TwoWay, Converter={StaticResource SelectiveItemToValue}, ConverterParameter={Binding Path=BindingContext, Source={x:Reference UBIKEditStringControl}}}"
SelectionMode="Single"
ItemSize="90"
Style="{DynamicResource SelectableListView}"
VerticalOptions="Center">
 
<sync:SfListView.DataSource>
<dataSource:DataSource>
<dataSource:DataSource.SortDescriptors>
<dataSource:SortDescriptor Direction="Ascending" PropertyName="Value" />
</dataSource:DataSource.SortDescriptors>
</dataSource:DataSource>
</sync:SfListView.DataSource>
</sync:SfListView>
 
</source>
 
{{Hint|This example can be found in the Tyra customising.}}
[[Category:2.6.1|Property Based Content Sorting]]
[[Category:WinX|Property Based Content Sorting]]
511
edits