Toggle​Switch​Automation​Peer Toggle​Switch​Automation​Peer Toggle​Switch​Automation​Peer Class

Definition

Exposes ToggleSwitch types to Microsoft UI Automation.

public : class ToggleSwitchAutomationPeer : FrameworkElementAutomationPeer, IToggleSwitchAutomationPeer, IToggleProviderpublic class ToggleSwitchAutomationPeer : FrameworkElementAutomationPeer, IToggleSwitchAutomationPeer, IToggleProviderPublic Class ToggleSwitchAutomationPeer Inherits FrameworkElementAutomationPeer Implements IToggleSwitchAutomationPeer, IToggleProvider
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited methods

Inherited properties

Remarks

The Windows Runtime ToggleSwitch class creates a new ToggleSwitchAutomationPeer as its OnCreateAutomationPeer definition. ToggleSwitch is sealed, so the normal scenario of deriving from the ToggleSwitch class and its existing peer isn't applicable to ToggleSwitchAutomationPeer.

Default peer implementation and overrides in ToggleSwitchAutomationPeer

ToggleSwitchAutomationPeer has overrides of Core methods such that the associated AutomationPeer methods provide peer-specific information to a Microsoft UI Automation client.

Although a ToggleSwitch can have text content, there is no GetName implementation that can use a string representation. You should set a value for automation Name using the AutomationProperties attached properties.

The peer also has other behaviors that are provided by the base FrameworkElementAutomationPeer class. For more info, see "Base implementation in FrameworkElementAutomationPeer" section of Custom automation peers.

Constructors

ToggleSwitchAutomationPeer(ToggleSwitch) ToggleSwitchAutomationPeer(ToggleSwitch) ToggleSwitchAutomationPeer(ToggleSwitch)

Initializes a new instance of the ToggleSwitchAutomationPeer class.

public : ToggleSwitchAutomationPeer(ToggleSwitch owner)public ToggleSwitchAutomationPeer(ToggleSwitch owner)Public Sub New(owner As ToggleSwitch)
Parameters
owner
ToggleSwitch ToggleSwitch ToggleSwitch

The ToggleSwitch to create a peer for.

Attributes

Properties

ToggleState ToggleState ToggleState

Gets the toggle state of the control.

public : ToggleState ToggleState { get; }public ToggleState ToggleState { get; }Public ReadOnly Property ToggleState As ToggleState
Value
ToggleState ToggleState ToggleState

The toggle state of the control.

Attributes

Methods

Toggle() Toggle() Toggle()

Cycles through the toggle states of a control.

public : void Toggle()public void Toggle()Public Function Toggle() As void
Attributes

See Also