Skip to content

XamlRootContenType is invalid on desktop targets #20490

Closed as not planned
Closed as not planned

Description

@dr1rrb

The DesktopWindowXamlSource is using a XamlIslandRoot to host the XAML visual tree. This cause the ContentRoot.Type to be invalid, driving input source to not be configured properly:

This is the root cause of the issue discussed below:

Discussed in #20300

Originally posted by HakanL May 9, 2025
I used to have this code in my Uno 5.6 start up code to capture pointer movements (it's to turn on the backlight of a screen on a RPi device) and it worked fine:

var coreWindow = CoreWindow.GetForCurrentThread();
coreWindow.PointerMoved += (s, e) =>
{
    // Turn on backlight
};

With Uno 6 coreWindow is not null, but the events are never fired. I tried with Window.Current.Content which has the events, and they are fired on regular content, but I need these fired on dialogs as well, which it won't. Any suggestions on how to globally capture PointerMoved? This is for Skia Desktop on Linux (but I can reproduce on Windows).

Activity

  1. MartinZikmund commented on May 23, 2025

    @MartinZikmund
    Member

    Closing this as we discussed, the content root type matches WinUI, so this is expected.

  2. github-actions commented on May 6, 2026

    @github-actions
    Contributor

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests.

  3. locked as resolved and limited conversation to collaborators on May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions