RibbonItemAutomationPeer Class
Exposes ribbon items to UI Automation.
public class RibbonItemAutomationPeer : ItemAutomationPeer
- Inheritance:
- object AutomationPeer ItemAutomationPeer object
Constructors
RibbonItemAutomationPeer(object, RibbonItemsControlAutomationPeer)
Initializes an instance of the RibbonItemAutomationPeer
class.
public RibbonItemAutomationPeer(object item, RibbonItemsControlAutomationPeer itemsControlAutomationPeer)
Parameter | Type | Description |
---|---|---|
item | object | The data in the |
itemsControlAutomationPeer | RibbonItemsControlAutomationPeer | The RibbonItemsControlAutomationPeer that is associated with the ItemsControlBase that
holds the |
Properties
ExpandCollapseState
Gets the state, expanded or collapsed, of the control.
ToggleState
Gets the toggle state of the control.
Methods
Collapse()
Hides all nodes, controls, or content that are descendants of the control.
public void Collapse()
Expand()
Displays all child nodes, controls, or content of the control.
public void Expand()
GetAutomationControlTypeCore()
Gets the AutomationControlType for the element that is associated with the UI Automation peer.
protected override AutomationControlType GetAutomationControlTypeCore()
Returns
- AutomationControlType:
A AutomationControlType indicating the control type.
GetAutomationIdCore()
Gets the automation ID for the element associated with this UI Automation peer.
protected override string GetAutomationIdCore()
Returns
- string:
The automation ID for the element associated with this UI Automation peer.
GetClassNameCore()
Gets a human readable name that, in addition to AutomationControlType, differentiates the control represented by this AutomationPeer.
GetNameCore()
Gets the text string describing the element that is associated with this automation peer.
GetPattern(PatternInterface)
Gets the object that supports the specified control pattern of the element that is associated with this automation peer.
public override object GetPattern(PatternInterface patternInterface)
Parameter | Type | Description |
---|---|---|
patternInterface | PatternInterface | A value in the enumeration. |
Returns
- object:
This method will return a
this
pointer in the follow cases:-
If
patternInterface
is Invoke. -
If
patternInterface
is ExpandCollapse andOwner
is a PopupButton or SplitButton. -
If
patternInterface
is Toggle andOwner
is a CheckBox or RadioButton. -
If
patternInterface
is Toggle andOwner
is a ButtonBase and it'sCommandParameter
is a ICheckableCommandParameter.
-
If
Invoke()
public void Invoke()
Toggle()
Cycles through the toggle states of a control.
public void Toggle()