In This Article

RibbonControlAutomationPeer Class

Exposes ribbon control types to UI Automation.

public class RibbonControlAutomationPeer : FrameworkElementAutomationPeer
Inheritance:
object AutomationPeer UIElementAutomationPeer FrameworkElementAutomationPeer object
Derived:
RibbonAutomationPeer TabAutomationPeer

Constructors

RibbonControlAutomationPeer(FrameworkElement)

Initializes an instance of the RibbonControlAutomationPeer class.

public RibbonControlAutomationPeer(FrameworkElement owner)
Parameter Type Description
owner FrameworkElement

The owner of the automation peer.

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.

GetChildrenCore()

Gets the collection of child elements of the UIElement that is associated with this UIElementAutomationPeer. This method is called by GetChildren().

protected override List<AutomationPeer> GetChildrenCore()

Returns

List<AutomationPeer>:

A list of child AutomationPeer elements.

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()