navigationnView hamburger menu selected by default
Eduardo Gomez
3,571
Reputation points
My winUI 3 app, when I run it, the hamburger is selected by defoult, with a ugly white
<Window
x:Class="Demy.View.NavWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<NavigationView
Background="{ThemeResource AcrylicBackgroundFillColorBaseBrush}"
IsBackButtonVisible="Collapsed"
IsSettingsVisible="False"
PaneDisplayMode="LeftCompact">
<Interactivity:Interaction.Behaviors>
<Core:EventTriggerBehavior EventName="SelectionChanged">
<Core:EventTriggerBehavior.Actions>
<Core:InvokeCommandAction Command="{x:Bind ViewModel.NavigateToPageCommand}" />
</Core:EventTriggerBehavior.Actions>
</Core:EventTriggerBehavior>
</Interactivity:Interaction.Behaviors>
<NavigationView.MenuItems>
<NavigationViewItem
Content="Manage classroom"
Tag="ManageClassPage">
<NavigationViewItem.Icon>
<BitmapIcon UriSource="ms-appx:///Icons/classroom.png" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
Content="Create meeting"
Tag="CreateMeetingPage">
<NavigationViewItem.Icon>
<BitmapIcon UriSource="ms-appx:///Icons/meeting.png" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
Content="Join meeting"
Tag="JoinMeetingPage">
<NavigationViewItem.Icon>
<BitmapIcon UriSource="ms-appx:///Icons/join.png" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
Content="Report card"
Tag="ReportCardPage">
<NavigationViewItem.Icon>
<BitmapIcon UriSource="ms-appx:///Icons/report-card.png" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
Content="Schedule exam"
Tag="ScheduleExamPage">
<NavigationViewItem.Icon>
<BitmapIcon UriSource="ms-appx:///Icons/Schedule.png" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem
Content="Subjects"
Tag="SubjectPage">
<NavigationViewItem.Icon>
<BitmapIcon UriSource="ms-appx:///Icons/school-subject.png" />
</NavigationViewItem.Icon>
</NavigationViewItem>
</NavigationView.MenuItems>
<Frame x:Name="NavFrame" />
</NavigationView>
</Window>
Sign in to answer