Template 10: Hamburger menu keyboard shortcuts

4

I am new in uwp app development. I made simple application based on Template 10 Hamburger template.I would like access hamburger menu item by keyboard shortcut. How is it possible?

I try use AccessKey, but HamburgerButtonInfo don't have this property, so I try:

    <Controls:HamburgerButtonInfo x:Name="SettingsButton" 
                                          PageParameter="0" 
                                          PageType="views:SettingsPage">
           <StackPanel Orientation="Horizontal" AccessKey="D" >
                    <SymbolIcon Width="48"
                                Height="48"
                                Symbol="Setting" />
                    <TextBlock Margin="12,0,0,0"
                               VerticalAlignment="Center"
                               Text="Settings" />
           </StackPanel>
     </Controls:HamburgerButtonInfo>

But result is exception with message: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

Any ideas?

Thanks, Radim

uwp
uwp-xaml
template10
asked on Stack Overflow Mar 18, 2017 by Radim J.

1 Answer

0

As @KenTucker said:

Try putting the accesskey on the textblock and handle the AccessKeyInvoked event of the textblock to navigate to the view.

I add this only so it can be marked as resolved.

Thank you for using Template 10.

answered on Stack Overflow Jan 26, 2018 by Jerry Nixon

User contributions licensed under CC BY-SA 3.0