State Persistence in UWP Pivot Grid (SfPivotGrid)

10 May 20211 minute to read

The SfPivotGrid supports maintaining the collapsed and expanded state of the corresponding pivot item when it gets changed. This can be achieved by enabling the StatePersistenceEnabled property in the SfPivotGrid control. Refer to the following code snippet to enable the state persistence.

<syncfusion:SfPivotGrid x:Name="PivotGrid1" StatePersistenceEnabled="True"/>
PivotGrid1.StatePersistenceEnabled = true;
PivotGrid1.StatePersistenceEnabled = True

PivotGrid-with-state-persistence-enabled

SfPivotGrid with collapsed “Canada”

PivotGrid-with-state-persistence-enabled1

SfPivotGrid maintaining collapsed state of “Canada” after pivot change