<Page.Resources> <syncfusion:Columns x:Key="maxWidthColumns"> <syncfusion:GridTextColumn HeaderText="UserId" MappingName="UserId" /> <syncfusion:GridTextColumn HeaderText="Name" MappingName="Name" /> </syncfusion:Columns> <syncfusion:Columns x:Key="minWidthColumns"> <syncfusion:GridTextColumn HeaderText="DateofBirth" MappingName="DateofBirth" /> <syncfusion:GridTextColumn HeaderText="Salary" MappingName="Salary" /> </syncfusion:Columns> </Page.Resources> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="Screen"> <VisualState> <VisualState.StateTriggers> <AdaptiveTrigger MinWindowWidth="700" /> </VisualState.StateTriggers> <VisualState.Setters> <Setter Target="sfGrid.Columns" Value="{StaticResource maxWidthColumns}" /> </VisualState.Setters> </VisualState> <VisualState> <VisualState.StateTriggers> <AdaptiveTrigger MinWindowWidth="0" /> </VisualState.StateTriggers> <VisualState.Setters> <Setter Target="sfGrid.Columns" Value="{StaticResource minWidthColumns}" /> </VisualState.Setters> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> |