我希望我的SplitView
在紧凑状态下不可见。但即使在紧凑状态和开放状态下,它也会占据很大的宽度。
<SplitView x:Name="svNav" DisplayMode="CompactOverlay">
<SplitView.Content>
<StackPanel Width="0" />
</SplitView.Content>
<SplitView.Pane>
<Grid Name="lbPane" Width="auto" VerticalAlignment="Stretch">
<ListView>
<TextBlock FontSize="24">Mode</TextBlock>
<ListViewItem>
<StackPanel Orientation="Horizontal">
<TextBlock FontFamily="Segoe MDL2 Assets" VerticalAlignment="Center"></TextBlock>
<TextBlock VerticalAlignment="Center" Margin="20,0">Standard Mode</TextBlock>
</StackPanel>
</ListViewItem>
<ListViewItem>
<StackPanel Orientation="Horizontal">
<TextBlock FontFamily="Segoe MDL2 Assets" VerticalAlignment="Center"></TextBlock>
<TextBlock VerticalAlignment="Center" Margin="20,0">Scientific Mode</TextBlock>
</StackPanel>
</ListViewItem>
<ListViewItem>
<StackPanel Orientation="Horizontal">
<TextBlock FontFamily="Segoe MDL2 Assets" VerticalAlignment="Center"></TextBlock>
<TextBlock VerticalAlignment="Center" Margin="20,0">Converter</TextBlock>
</StackPanel>
</ListViewItem>
<ListViewItem>
<StackPanel Orientation="Horizontal">
<TextBlock FontFamily="Segoe MDL2 Assets" VerticalAlignment="Center"></TextBlock>
<TextBlock VerticalAlignment="Center" Margin="20,0">Programming Mode</TextBlock>
</StackPanel>
</ListViewItem>
</ListView>
</Grid>
</SplitView.Pane>
</SplitView>
设计中存在问题。请看看可以做些什么来解决问题 Preview of application
答案 0 :(得分:0)
我找到了答案。拆分视图应该是页面和网格应该是单位内容的根元素。