Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 3.05 KB

toggleswitchautomationpeer.md

File metadata and controls

37 lines (24 loc) · 3.05 KB
-api-id -api-type
T:Windows.UI.Xaml.Automation.Peers.ToggleSwitchAutomationPeer
winrt class

Windows.UI.Xaml.Automation.Peers.ToggleSwitchAutomationPeer

-description

Exposes ToggleSwitch types to Microsoft UI Automation.

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

-examples

-see-also

ToggleSwitch, FrameworkElementAutomationPeer, IToggleProvider, Custom automation peers