0

我目前正在使用 UWPXAMLC#. 我有一个应用程序,其中我需要一个菜单​​和一个左窗格。请参阅此左侧菜单示例:

TheNextWeb - 显示 Square

图片 - 下一个网络

窗格需要始终打开。这是我目前在我的MainPage.xaml

<SplitView x:Name="MySplitView" DisplayMode="CompactOverlay"  IsPaneOpen="False" 
               CompactPaneLength="50" OpenPaneLength="200">
        <SplitView.Pane>
            <StackPanel Background="Gray">
                <Button x:Name="HamburgerButton" FontFamily="Segoe MDL2 Assets" Content="&#xE700;"
                    Width="50" Height="50" Background="Transparent" Click="HamburgerButton_Click"/>
                <StackPanel Orientation="Horizontal">
                    <Button x:Name="HomeButton" FontFamily="Segoe MDL2 Assets" Content="&#xE10F;"
                    Width="50" Height="50" Background="Transparent" Click="HomeButton_Click"/>
                    <TextBlock Text="Accueil" FontSize="18" VerticalAlignment="Center" />
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Button x:Name="CommisButton" FontFamily="Segoe MDL2 Assets" Content="&#xE716;"
                        Width="50" Height="50" Background="Transparent" Click="CommisButton_Click"/>
                    <TextBlock Text="Commis" FontSize="18" VerticalAlignment="Center" />
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Button x:Name="CommentsButton" FontFamily="Segoe MDL2 Assets" Content="&#xE8BD;"
                        Width="50" Height="50" Background="Transparent" Click="CommentsButton_Click"/>
                    <TextBlock Text="Commentaires" FontSize="18" VerticalAlignment="Center" />
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Button x:Name="SettingsButton" FontFamily="Segoe MDL2 Assets" Content="&#xE713;"
                        Width="50" Height="50" Background="Transparent" Click="SettingsButton_Click"/>
                    <TextBlock Text="Paramètres" FontSize="18" VerticalAlignment="Center" />
                </StackPanel>
            </StackPanel>
        </SplitView.Pane>
        <SplitView.Content>
            <!-- My Content -->
        </SplitView.Content>
    </SplitView>

我试图再做一个SplitView.Pane,但没有成功。我需要一种制作左面板的方法,就是这样!

谢谢

4

1 回答 1

3

在您的SplitView.Content中,添加另一个SplitView.

<SplitView.Content>
    <!-- My Content -->
    <SplitView x:Name="MyRisksPane" IsPaneOpen="True" OpenPaneLength="350" Background="White" DisplayMode="Inline">
        <SplitView.Pane>
            <!-- Your SplitView.Pane content goes here -->
        </SplitView.Pane>
        <SplitView.Content>
            <Frame x:Name="FrameDetailPane"/>
        </SplitView.Content>
    </SplitView>
</SplitView.Content>
于 2016-05-11T05:24:08.697 回答