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