2016-01-06 25 views
2

我已經創建了一個SPLITVIEW,但我必須在確定的SPLITVIEW窗格中的菜單選項像這樣在Groove音樂學院應用隔膜的問題:分離的SPLITVIEW窗格

enter image description here

我試着使用線形,但我認爲這不是一個解決方案。

如何在SplitView窗格中定義這種分隔符?

+0

謝謝先生worldofjr的編輯:) – user3821206

回答

1

使用Windows 10 SplitView – Build Your First Hamburger Menu作爲指導,我已經調整它,如下所示使用邊框和矩形來實現分隔符。

Hamburger Menu With Separator

<SplitView x:Name="MySplitView" DisplayMode="CompactOverlay" IsPaneOpen="False" 
     CompactPaneLength="50" OpenPaneLength="150"> 
    <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="MenuButton1" FontFamily="Segoe MDL2 Assets" Content="&#xE825;" 
      Width="50" Height="50" Background="Transparent"/> 
       <TextBlock Text="Button 1" FontSize="18" VerticalAlignment="Center" /> 
      </StackPanel> 
      <Border BorderBrush="Red" BorderThickness="1" Width="Auto" HorizontalAlignment="Stretch" Margin="4,0"/> 
      <StackPanel Orientation="Horizontal"> 
       <Button x:Name="MenuButton2" FontFamily="Segoe MDL2 Assets" Content="&#xE10F;" 
       Width="50" Height="50" Background="Transparent"/> 
       <TextBlock Text="Button 2" FontSize="18" VerticalAlignment="Center" /> 
      </StackPanel> 
      <Rectangle HorizontalAlignment="Stretch" Fill="Blue" Height="4" Margin="4,0"/> 
      <StackPanel Orientation="Horizontal"> 
       <Button x:Name="MenuButton3" FontFamily="Segoe MDL2 Assets" Content="&#xE1D6;" 
       Width="50" Height="50" Background="Transparent"/> 
       <TextBlock Text="Button 3" FontSize="18" VerticalAlignment="Center" /> 
      </StackPanel> 
     </StackPanel> 
    </SplitView.Pane> 
    <SplitView.Content> 
     <StackPanel> 
      <TextBlock Text="Separator Hamburger Menu Test"/> 
     </StackPanel> 
    </SplitView.Content> 
</SplitView>