Class MenuItemAccessibilityPeer
- Namespace
- Forma
- Assembly
- Forma.dll
One entry of a PopupMenu.
public sealed class MenuItemAccessibilityPeer : AccessibilityPeer
- Inheritance
-
MenuItemAccessibilityPeer
- Inherited Members
Remarks
A menu draws its entries rather than building a control for each, so without this a menu is an empty node: a screen reader announces "menu" and stops, and an automation client sees a container with nothing in it. That is the one place in a Forma application where the whole command surface can go missing at once.
Properties
Actions
Press and Focus, plus Toggle for a checkable entry.
public override AccessibilityActions Actions { get; }
Property Value
AutomationId
Always empty: an entry is data rather than a control, so it has no automation id.
public override string AutomationId { get; }
Property Value
Bounds
The entry's rectangle in global coordinates, matching what pointer input uses.
public override Rectangle Bounds { get; }
Property Value
- Rectangle
Children
Always empty. A submenu is a separate menu, reached when it opens.
public override IReadOnlyList<AccessibilityPeer> Children { get; }
Property Value
Id
This entry's own identity, distinct from the menu's.
public override int Id { get; }
Property Value
Index
Position in the menu's item list, including hidden entries and separators.
public int Index { get; }
Property Value
IsVirtual
Always true: an entry is drawn by the menu, not built as a control.
public override bool IsVirtual { get; }
Property Value
Name
The entry's text, which is what an assistive technology announces.
public override string Name { get; }
Property Value
Role
Always MenuItem.
public override AccessibilityRole Role { get; }
Property Value
States
Disabled, Checked, Current for the highlighted entry, and Expanded or Collapsed for one that owns a submenu.
public override AccessibilityStates States { get; }
Property Value
Value
Always empty: a menu entry is a command, not a value.
public override string Value { get; }
Property Value
Methods
Invoke(AccessibilityActions, object)
Activates this entry rather than the menu. The base implementation forwards to the owning control, which for a menu would mean "press the menu" and do nothing useful.
public override bool Invoke(AccessibilityActions action, object argument = null)
Parameters
actionAccessibilityActionsargumentobject