必须具备以下功能
我尝试了很多,但不能做第二条规则,我需要你的帮助:)
XAML:
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="AdaptiveStates">
<VisualState x:Name="NarrowState">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="0"/>
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="MainSplitView.IsPaneOpen" Value="False"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="MiddleState">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="920"/>
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="MainSplitView.IsPaneOpen" Value="True"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<SplitView x:Name="MainSplitView" IsPaneOpen="True" OpenPaneLength="400" DisplayMode="CompactInline" CompactPaneLength="0">
<SplitView.Pane>
<ListView/>
</SplitView.Pane>
<SplitView.Content>
<Frame x:Name="DetailFrame"/>
</SplitView.Content>
</SplitView>
</Grid>