Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 3.03 KB

buttonautomationpeer.md

File metadata and controls

39 lines (26 loc) · 3.03 KB
-api-id -api-type
T:Windows.UI.Xaml.Automation.Peers.ButtonAutomationPeer
winrt class

Windows.UI.Xaml.Automation.Peers.ButtonAutomationPeer

-description

Exposes Button types to Microsoft UI Automation.

-remarks

The Windows Runtime Button class creates a new ButtonAutomationPeer as its OnCreateAutomationPeer definition. Derive your automation peer from ButtonAutomationPeer if you are deriving a custom class from Button 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.

Default peer implementation and overrides in ButtonAutomationPeer

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

ButtonAutomationPeer derived classes

ButtonAutomationPeer is the parent class for AppBarButtonAutomationPeer.

-examples

-see-also

ButtonBaseAutomationPeer, IInvokeProvider, Button, Custom automation peers