Articles in this section

How to define pivotItem comparer in xaml

We would like to let you know that we can define the PivotItem Comparer in xaml through following the below mentioned procedure:

  1. Create the class ReverseOrderComparer.

2) Include the namespace of the class in xaml file.

XAML

xmlns:local="clr-namespace:[Name of the namespace]"

 

3) Add ReverseOrderComparer class as a resource through defining a key using <Grid.Resources/>

 

XAML

<Grid.Resources> 
<local:ReverseOrderComparer x:Key="reverseOrderComparer"/>
</Grid.Resources> 

 

4) Add the Comparer attribute to the pivotItem that you want to compare and call the created object as StaticResource.

   

XAML

<syncfusion:PivotItem AllowRunTimeGroupByField="True" FieldMappingName="Name" TotalHeader="" Comparer="{StaticResource reverseOrderComparer}"/>
 

                    

 

 

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied