MicrosoftDocs / winrt-api

WinRT reference content for developing Microsoft Universal Windows Platform (UWP) apps
Creative Commons Attribution 4.0 International
231 stars 500 forks source link

NavigationView unintended controller controls #2405

Closed ForceANature110 closed 11 months ago

ForceANature110 commented 1 year ago

NavigationView pane opens when pressing the View button on a controller and there doesn't seem to be a way to handle this or cancel it when unintended.

Same as B button on a controller closing it and no way to change or remove this.

ForceANature110 commented 1 year ago

worked around by handling like :

private void NavViewMenu_PreviewKeyDown(object sender, KeyRoutedEventArgs e)
        {
            switch (e.Key)
            {
                case Windows.System.VirtualKey.GamepadView:
                    e.Handled = true;
                    break;

            }

        }

Seems janky though.