You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SelectorItemAutomationPeer: Select/IsSelected always fail because no type implements ISelector #24628
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.
Activity