In This Article

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 Items collection that is associated with this RibbonItemAutomationPeer.

itemsControlAutomationPeer RibbonItemsControlAutomationPeer

The RibbonItemsControlAutomationPeer that is associated with the ItemsControlBase that holds the Items collection.

Properties

ExpandCollapseState

Gets the state, expanded or collapsed, of the control.

public ExpandCollapseState ExpandCollapseState { get; }

Property Value

ExpandCollapseState

ToggleState

Gets the toggle state of the control.

public ToggleState ToggleState { get; }

Property Value

ToggleState

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.

protected override string GetClassNameCore()

Returns

string:

The string that contains the name.

GetNameCore()

Gets the text string describing the element that is associated with this automation peer.

protected override string GetNameCore()

Returns

string:

The string that contains the name.

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:

Invoke()

public void Invoke()

Toggle()

Cycles through the toggle states of a control.

public void Toggle()