Skip to content

SelectorItemAutomationPeer: Select/IsSelected always fail because no type implements ISelector #24628

Closed

Description

@SolidRockProgrammer

Current behavior

Microsoft.UI.Xaml.Controls.ISelector is declared in Uno.UI.dll but implemented by no type in it — not Selector, not ListView, nor anything in their base chains (Skia runtime uno-runtime/net10.0/skia/Uno.UI.dll, Uno.WinUI 6.7.103; identical in 6.6.176).

SelectorItemAutomationPeer tests the owning peer's Owner with isinst ISelector:

IL_001E: callvirt FrameworkElementAutomationPeer::get_Owner
IL_0023: isinst   ISelector            // always null
IL_002A: brtrue.s IL_0037              // never taken
IL_002C: ldstr    "Operation cannot be performed."
IL_0031: newobj   Exception::.ctor
IL_0036: throw                         // always

As a result, Select(), AddToSelection() and RemoveFromSelection() always throw, and IsSelected (same test) is always false, for every Selector-derived control (ListView, ListBox, ComboBox, FlipView).

The inconsistency that points at the fix

The same type's GetPatternCore tests the owner against the concrete Selector type, which works. So the SelectionItem pattern is advertised, and then every operation on it fails.

Expected behavior

SelectionItemPattern works on list items: IsSelected reflects the selection and Select() selects the row. Either make the four selection members use the same test GetPatternCore uses, or have Selector implement ISelector.

Why it matters

Beyond UI automation, IsSelected always returning false means a screen reader can never announce which row of a list is selected, in any Uno app on this runtime.

How to reproduce

Any ListView with a few items on the Skia desktop head. From an out-of-process UIA client, get a row's SelectionItemPattern and call Select(). It throws "Operation cannot be performed.", and CurrentIsSelected is false even for the selected row.

Environment

Uno.WinUI 6.7.103 (also 6.6.176), Skia desktop head, .NET 10, Windows 11.

Activity

  1. added
    7.1
    on Oct 14, 2026
  2. removed
    7.1
    on Oct 29, 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