Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xbox UWP app: Pointer mode does not work properly when scaling is set to default (200 %) #9231

Closed
remokeitel opened this issue Nov 29, 2023 · 3 comments
Labels
appModel-UWP Exclusive to WinUI 2 UWP apps needs-triage Issue needs to be triaged by the area owners

Comments

@remokeitel
Copy link

remokeitel commented Nov 29, 2023

Describe the bug

The UWP app is configured for the Xbox so that the pointer mode is only enabled when requested (RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested). The scaling is set to default (200 % for UWP apps). One page was created with a ScrollViewer and one with a WebView2 control. Both controls have the properties "RequiresPointer=WhenEngaged" and "IsFocusEngagementEnabled=True". As soon as the controls receive the focus and the pointer mode is activated (IsFocusEngaged = True), the pointer appears. However, the pointer can only be used in 25 % of the area of the control at the top left. As soon as scaling is disabled (ApplicationViewScaling.TrySetDisableLayoutScaling(true)) and the app is displayed at 100 %, the pointer can be navigated over the entire area of the control.

Steps to reproduce the bug

App.xaml.cs:

public App()
{
    this.InitializeComponent();
    this.Suspending += OnSuspending;

    if (AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Xbox")
    {
        this.RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested;
        //ApplicationViewScaling.TrySetDisableLayoutScaling(true);
    }
}

MainPage.xaml:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <TextBox Grid.Row="0" Text="Test" />
    <ScrollViewer
        x:Name="ScrollViewer"
        Grid.Row="1"
        IsFocusEngagementEnabled="True"
        RequiresPointer="WhenEngaged"
        GotFocus="ScrollViewer_GotFocus">
        <StackPanel>
            <TextBlock Text="Hello" />
        </StackPanel>
    </ScrollViewer>
</Grid>

MainPage.xaml.cs:

public MainPage()
{
    this.InitializeComponent();
}

private void ScrollViewer_GotFocus(object sender, RoutedEventArgs args)
{
    ScrollViewer.IsFocusEngaged = true;
}

Navigate to ScrollViewer with Xbox Controller, so that it gets the focus.

Expected behavior

Pointer can be navigated over the entire area of the control by default Xbox UWP scaling (200 %)

Screenshots

No response

NuGet package version

None

Packaging type

No response

Windows version

No response

IDE

No response

Additional context

Operating System:
Xbox

OS Version:
10.0.25398.2538

@bpulliam bpulliam transferred this issue from microsoft/WindowsAppSDK Jan 11, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jan 11, 2024
@bpulliam bpulliam added appModel-UWP Exclusive to WinUI 2 UWP apps and removed needs-triage Issue needs to be triaged by the area owners labels Jan 11, 2024
@ranjeshj
Copy link
Contributor

@remokeitel
https://github.com/microsoft/microsoft-ui-xaml/blob/main/docs/contribution_handling.md#winui-2

The WinUI team is currently spending its time on WinUI 3. To help with this focus, any new bug filed against WinUI 2 is closed in this repo unless it's a security issue or is critical to our business priorities.

@ranjeshj ranjeshj closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2024
@remokeitel
Copy link
Author

@ranjeshj But on Xbox there is no WinUI 3 available! And this issue has nothing to do with WinUI, but with UWP (without WinUI).

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Feb 23, 2024
@softworkz
Copy link

softworkz commented Mar 7, 2024

Don't Ever Use WinUI3!

That's the message that this is telling: Eventually, they will abandon WinUI3 in the same way like they do for WinUI2 - from one day to another.

Anyway, it seems like WinUI3 has been abandoned already and whether:

  • Your issue remains open and ignored (WinUI3), or
  • Your issue is closed and ignored (WinUI2)

doesn't make a difference at all.

Related: Great News: All Bugs Will be Fixed In the Year 2041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appModel-UWP Exclusive to WinUI 2 UWP apps needs-triage Issue needs to be triaged by the area owners
Projects
None yet
Development

No branches or pull requests

4 participants