mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 06:55:59 +01:00
fix: a tree entry tells its state wherever the mouse is on its row
Windows passes over the parts of a template when it looks for what lies under the mouse, so the gaps beside the arrow and after the name led to the entry, which told no state: NVDA said "Całkowo" there and "Całkowo zwinięte" on the name. The row is now a control and is found in those gaps.
This commit is contained in:
@@ -49,6 +49,11 @@ public class ExpandableTreeViewItem : TreeViewItem
|
|||||||
{
|
{
|
||||||
base.OnApplyTemplate(e);
|
base.OnApplyTemplate(e);
|
||||||
_row = e.NameScope.Find<Control>("PART_LayoutRoot");
|
_row = e.NameScope.Find<Control>("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();
|
TellRowLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user