diff --git a/StarterNG/Controls/ExpandableTreeViewItem.cs b/StarterNG/Controls/ExpandableTreeViewItem.cs index 33ddca6..7ab4c6c 100644 --- a/StarterNG/Controls/ExpandableTreeViewItem.cs +++ b/StarterNG/Controls/ExpandableTreeViewItem.cs @@ -49,6 +49,11 @@ public class ExpandableTreeViewItem : TreeViewItem { base.OnApplyTemplate(e); _row = e.NameScope.Find("PART_LayoutRoot"); + // A part of a template is passed over when Windows looks for what lies under the + // mouse, so the gaps beside the arrow and the name led to the entry, which told no + // state. As a control the row itself is found there. + if (_row is not null) + AutomationProperties.SetAccessibilityView(_row, AccessibilityView.Control); TellRowLater(); }