Das Hamburger-Menü ist nur eine normale Schaltfläche mit dem Hamburger-Symbol. Sie können ganz einfach erstellen Sie Ihre eigenen wie:
<Button x:Name="navigationMenu"
Style="{StaticResource NavigationMenuButton}"
Command="{x:Bind ShowHideNavigationMenuCommand}" />
mit folgenden Stil, die nur die Standardschaltfläche Stil mit ein paar kleinen Änderungen ist:
<Style x:Key="NavigationMenuButton" TargetType="Button" BasedOn="{StaticResource NavigationBackButtonSmallStyle}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{ThemeResource TitleBarForegroundColor}" />
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
<Setter Property="Content" Value="" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid x:Name="RootGrid"
Background="{TemplateBinding Background}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource SystemColorHighlightHighColor}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource SystemColorHighlightColor}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content"
Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource SubtleColor}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<ContentPresenter x:Name="Content"
Content="{TemplateBinding Content}"
Foreground="{TemplateBinding Foreground}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
AutomationProperties.AccessibilityView="Raw" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Werfen Sie einen Blick auf Template10. Es ist ziemlich einfach, dies zu erreichen. Um dies zu erreichen, benötigen Sie eine SplitView. – Alex
Haben Sie sich den Quelltext von [Template10] angesehen (https://github.com/Windows-XAML/Template10/blob/master/Template10%20 (Library) /Controls/HamburgerMenu.xaml), um eine Vorstellung davon zu bekommen, wie es ist erledigt? –