I am using WinUI 3 and WindowsAppSDK. When I use a NavigationView and set AccessKey on the NavigationViewItem, it works ... until I also define the MenuItemTemplate. As soon as a DataTemplate is used for the MenuItemTemplate, the access keys stop working. Any thoughts on how to work around this?
Here is an example. Any thoughts?
<NavigationView>
<NavigationView.MenuItems>
<NavigationViewItem AccessKey="N">Nibble</NavigationViewItem>
<NavigationViewItem AccessKey="P">Pancake</NavigationViewItem>
</NavigationView.MenuItems>
<!-- uncomment this to break the access key functionality
<NavigationView.MenuItemTemplate>
<DataTemplate x:DataType="NavigationViewItem">
<StackPanel>
<ContentPresenter Content="{Binding Icon}" Margin="0,0,8,0"/>
<TextBlock Text="{Binding Content}"/>
</StackPanel>
</DataTemplate>
</NavigationView.MenuItemTemplate>
-->
</NavigationView>