Skip to content

[Feature] FocusTracker: Handle RootScrollViewer has focus and window unfocused betterย #4036

@Marv51

Description

@Marv51

Describe the problem this feature would solve

Focus in UWP/WinUI is a not exactly trivial problem, I guess that's why FocusTracker was added in the first place.

This is what the FocusTracker looks like if the RootScrollViewer has focus:

Name:
Type:                            ScrollViewer
Automation.Name:
Parent with Name:
               FocusTracker

It is hard to understand what is going on in this case, because this ScrollViewer is not visible and not added by the users XAML.

In the case that the window is unfocused or the FocusTracker is not active the four fields are simply empty. It would be better to add some information describing why no information is displayed.

Describe the solution

Different solutions for these common focus cases are possible.

Ideas:

  1. A status text could be added after the FocusTracker caption:
    • FocusTracker (inactive)
    • FocusTracker (Window unfocused)
    • FocusTracker (RootScrollViewer focused)
  2. A new status line could be added with the same status as above.
  3. The type or name rows could be used, when the RootScrollViewer is selected show that and show [Window unfocused] or [FocusTracker deactivated] in the other cases.

If this is a feature that would be interesting for the toolkit, I could try to implement this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions