Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 3.62 KB

File metadata and controls

47 lines (29 loc) · 3.62 KB
-api-id -api-type
T:Windows.UI.Xaml.Automation.Peers.ToggleButtonAutomationPeer
winrt class

Windows.UI.Xaml.Automation.Peers.ToggleButtonAutomationPeer

-description

Exposes ToggleButton types to Microsoft UI Automation.

-remarks

The Windows Runtime ToggleButton class creates a new ToggleButtonAutomationPeer as its OnCreateAutomationPeer definition.

ToggleButton has several derived classes such as RadioButton, which have template support and practical implementations of some important functionality. Make sure that you really want to derive from the base class. If you're sure you want to derive from ToggleButton, directly, derive your automation peer from ToggleButtonAutomationPeer and override OnCreateAutomationPeer so that it returns your custom peer.

Default peer implementation and overrides in ToggleButtonAutomationPeer

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

This peer has the base class ButtonBaseAutomationPeer and inherits behavior other than the overrides indicated above. Notably, GetName returns a string value based on examining the current Content. For more info, see ButtonBaseAutomationPeer.

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.

ToggleButtonAutomationPeer derived classes

ToggleButtonAutomationPeer is the parent class for several immediately derived classes that implement peer support for Windows Runtime controls. Here is the list of classes that directly derive from ToggleButtonAutomationPeer:

-examples

-see-also

ToggleButton, ButtonBaseAutomationPeer, IToggleProvider, Custom automation peers