question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NavigationView prevents full navigation with an xbox contoller on Windows 10

See original GitHub issue

Describe the bug Having Settings visible on a NavigationView can prevent navigation to content in the page.

Steps to reproduce the bug

  1. In a new blank app, add the following.
    <winui:NavigationView
        IsSettingsVisible="False">
        <Grid>
            <StackPanel>
                <RadioButton Content="Option 1" />
                <RadioButton Content="Option 2" />
                <RadioButton Content="Option 3" />
            </StackPanel>
        </Grid>
    </winui:NavigationView>
  1. Connect an XBoxOne controller to a Windows desktop PC.
  2. Run the app and notice that it’s possible to use the controller to move focus to all 3 of the radio buttons.
  3. Close app.
  4. Change the [above] code to set IsSettingsVisible="True".
  5. Run the app again and notice that it’s NOT possible to use the controller to move focus to the radio button captioned Option 3.

Expected behavior It should be possible to use the xbox controller to get to every control on a page that can receive focus. I understand that the issue is likely due to the XY navigation system only having a single item at the bottom of the screen but as pressing down when the focus is on Option 2 this doesn’t explain why focus cannot move to the radio button directly beneath it (Option 3).

This is not an issue of an automatically implied [radiobutton]group being applied to the RadioButtons.

  1. If it was it should still be possible to navigate between the options in the group.
  2. Changing the RadioButtons to Buttons (so there should be no implied grouping of related options) still produces the same behavior.

Screenshots n/a

Version Info

NuGet package version: Microsoft.UI.Xaml 2.2.190917002

Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2019 Update (18362) Yes
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Mobile
Xbox
Surface Hub
IoT

Additional context This issue was discovered as part of investigation into https://github.com/microsoft/WindowsTemplateStudio/issues/3407 A workaround is also listed there. I appreciate that using an xbox controller to navigate a desktop app is a niche scenario but it is supported.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
chingucodingcommented, Aug 21, 2020

This is indeed an issue with the XYFocus system. In the meantime you can use RadioButtons which work as expected:

<muxc:RadioButtons>
    <RadioButton Content="Option 1" />
    <RadioButton Content="Option 2" />
    <RadioButton Content="Option 3" />
</muxc:RadioButtons>

@ranjeshj @StephenLPeters Should we mark this as WinUI 3 given that this would probably require a framework fix?

0reactions
github-actions[bot]commented, Jul 29, 2023

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Settings Page item selection bug using Xbox controller in ...
NavigationView prevents full navigation with an xbox contoller on Windows 10 microsoft/microsoft-ui-xaml#1647.
Read more >
NavigationView Class (Microsoft.UI.Xaml.Controls)
Represents a container that enables navigation of app content. It has a header, a view for the main content, and a menu pane...
Read more >
Xbox One controller is navigating Windows 10 without ...
Xbox One controller is navigating Windows 10 without Steam or any 3rd - Microsoft Community.
Read more >
NavigationView Class (Windows.UI.Xaml.Controls)
Represents a container that enables navigation of app content. It has a header, a view for the main content, and a menu pane...
Read more >
Gamepad and remote control interactions - Windows apps
If you're using a Navigation view, the back button will be hidden automatically. For more information about backwards navigation, see Navigation ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found