我已經創建了一個SPLITVIEW,但我必須在確定的SPLITVIEW窗格中的菜單選項像這樣在Groove音樂學院應用隔膜的問題:分離的SPLITVIEW窗格
我試着使用線形,但我認爲這不是一個解決方案。
如何在SplitView窗格中定義這種分隔符?
我已經創建了一個SPLITVIEW,但我必須在確定的SPLITVIEW窗格中的菜單選項像這樣在Groove音樂學院應用隔膜的問題:分離的SPLITVIEW窗格
我試着使用線形,但我認爲這不是一個解決方案。
如何在SplitView窗格中定義這種分隔符?
使用Windows 10 SplitView – Build Your First Hamburger Menu作爲指導,我已經調整它,如下所示使用邊框和矩形來實現分隔符。
<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=""
Width="50" Height="50" Background="Transparent" Click="HamburgerButton_Click"/>
<StackPanel Orientation="Horizontal">
<Button x:Name="MenuButton1" FontFamily="Segoe MDL2 Assets" Content=""
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=""
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=""
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>
我覺得上面的示例是有點過時沒有準備好真實的世界。您可以嘗試我的示例在這裏顯示... https://bernhardelbl.wordpress.com/2015/11/17/hamburger-menu-with-splitview-for-windows-10-apps/
謝謝先生的回覆:) – user3821206
謝謝先生worldofjr的編輯:) – user3821206