-api-id | -api-type |
---|---|
T:Microsoft.UI.Xaml.Automation.Peers.CheckBoxAutomationPeer |
winrt class |
Exposes CheckBox types to Microsoft UI Automation.
The Windows Runtime CheckBox class creates a new CheckBoxAutomationPeer as its OnCreateAutomationPeer definition. Derive your automation peer from CheckBoxAutomationPeer if you are deriving a custom class from CheckBox and want to add automation support for additional features that you enabled in your custom class. Then override OnCreateAutomationPeer so that it returns your custom peer.
CheckBoxAutomationPeer has overrides of Core methods such that the associated AutomationPeer methods provide peer-specific information to a Microsoft UI Automation client.
- GetPattern reports that the peer provides pattern support for PatternInterface.Toggle (IToggleProvider ). This is actually coming from the ToggleButtonAutomationPeer base class; CheckBoxAutomationPeer doesn't override the Core method further.
- GetClassName returns "CheckBox".
- GetAutomationControlType returns AutomationControlType.CheckBox.
- The peer can fire the PropertyChanged automation event when ToggleState of the peer and owner control changes. This peer has the base class ButtonBaseAutomationPeer and inherits its 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, ButtonBaseAutomationPeer, CheckBox, IToggleProvider, Custom automation peers