Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Linq;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Automation.Peers;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
Expand Down Expand Up @@ -110,6 +111,9 @@ protected override void OnContextMenuOpening(ContextMenuEventArgs e)
base.OnContextMenuOpening(e);
}

protected override AutomationPeer OnCreateAutomationPeer()
=> new InheritanceMarginAutomationPeer(this);

private void LazyInitializeContextMenu()
{
if (ContextMenu is not InheritanceMarginContextMenu)
Expand Down Expand Up @@ -211,4 +215,12 @@ private void ResetFocus()
}
}
}

private sealed class InheritanceMarginAutomationPeer(InheritanceMarginGlyph owner) : ButtonAutomationPeer(owner)
{
protected override AutomationControlType GetAutomationControlTypeCore()
{
return AutomationControlType.Group;
}
}
}