ToggleSwitchAutomationPeer ToggleSwitchAutomationPeer ToggleSwitchAutomationPeer Class

Exposes ToggleSwitch types to Microsoft UI Automation.

Syntax

Declaration

public class ToggleSwitchAutomationPeerpublic class ToggleSwitchAutomationPeerPublic Class ToggleSwitchAutomationPeer

Inheritance Hierarchy

Inherited Members

Inherited methods

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Inherited properties

, ,

Windows.UI.Xaml.Automation.Peers.AutomationPeer.RaiseTextEditTextChangedEvent(Windows.UI.Xaml.Automation.AutomationTextEditChangeType,Windows.Foundation.Collections.IVectorView<System.String>)
Windows.UI.Xaml.Automation.Peers.AutomationPeer.RaiseTextEditTextChangedEvent(Windows.UI.Xaml.Automation.AutomationTextEditChangeType,Windows.Foundation.Collections.IVectorView<System.String>)
Windows.UI.Xaml.Automation.Peers.AutomationPeer.RaiseTextEditTextChangedEvent(Windows.UI.Xaml.Automation.AutomationTextEditChangeType,Windows.Foundation.Collections.IVectorView<System.String>)

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 summary

Initializes a new instance of the ToggleSwitchAutomationPeer class.

Properties summary

Gets the toggle state of the control.

Methods summary

Cycles through the toggle states of a control.

Constructors

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

    Initializes a new instance of the ToggleSwitchAutomationPeer class.

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

    Parameters

Properties

  • ToggleState
    ToggleState
    ToggleState
    ToggleState

    Gets the toggle state of the control.

    public ToggleState ToggleState { get; }public ToggleState ToggleState { get; }Public ReadOnly Property ToggleState As ToggleStatepublic ToggleState ToggleState { get; }

    Property Value

Methods

  • Toggle()
    Toggle()
    Toggle()
    Toggle()

    Cycles through the toggle states of a control.

    public void Toggle()public void Toggle()Public Function Toggle() As voidpublic void Toggle()

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ComposableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.Automation.Peers.dll