In This Article

StandardSwitcherItemAutomationPeer Class

Exposes StandardSwitcherItem types to UI Automation.

public class StandardSwitcherItemAutomationPeer : FrameworkElementAutomationPeer
Inheritance:
object AutomationPeer UIElementAutomationPeer FrameworkElementAutomationPeer object

Constructors

StandardSwitcherItemAutomationPeer(StandardSwitcherItem)

Exposes StandardSwitcherItem types to UI Automation.

public StandardSwitcherItemAutomationPeer(StandardSwitcherItem owner)
Parameter Type Description
owner StandardSwitcherItem

The owner element.

Properties

IsSelected

Gets a value that indicates whether an item is selected.

public bool IsSelected { get; }

Property Value

bool:

true if the element is selected; otherwise false.

SelectionContainer

Gets the UI Automation provider that implements ISelectionProvider and acts as the container for the calling object.

public IRawElementProviderSimple? SelectionContainer { get; }

Property Value

IRawElementProviderSimple:

The provider that supports ISelectionProvider.

Methods

AddToSelection()

Adds the current element to the collection of selected items.

public void AddToSelection()

GetAutomationControlTypeCore()

Gets the control type for the UIElement that is associated with this UIElementAutomationPeer. This method is called by GetAutomationControlType().

protected override AutomationControlType GetAutomationControlTypeCore()

Returns

AutomationControlType:

The Custom enumeration value.

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 the name of the UIElement that is associated with this UIElementAutomationPeer. This method is called by GetClassName().

protected override string GetClassNameCore()

Returns

string:

An Empty string.

GetHelpTextCore()

Gets the string that describes the functionality of the ContentElement that is associated with this ContentElementAutomationPeer. Called by GetHelpText().

protected override string GetHelpTextCore()

Returns

string:

The help text, usually from the ToolTip, or Empty if there is no help text.

GetLocalizedControlTypeCore()

When overridden in a derived class, is called by GetLocalizedControlType().

protected override string GetLocalizedControlTypeCore()

Returns

string:

The type of the control.

GetNameCore()

Gets the text label of the ContentElement that is associated with this ContentElementAutomationPeer. Called by GetName().

protected override string GetNameCore()

Returns

string:

The text label of the element that is associated with this automation peer.

GetPattern(PatternInterface)

Gets the control pattern for the UIElement that is associated with this UIElementAutomationPeer.

public override object GetPattern(PatternInterface patternInterface)
Parameter Type Description
patternInterface PatternInterface

A value from the enumeration.

Returns

object:

An object that implements the ISynchronizedInputProvider interface if patternInterface is SynchronizedInput; otherwise, null.

Invoke()

public void Invoke()

RemoveFromSelection()

Removes the current element from the collection of selected items.

public void RemoveFromSelection()

Select()

Deselects any selected items and then selects the current element.

public void Select()

Extension Methods