-api-id | -api-type |
---|---|
T:Windows.UI.Xaml.Automation.Peers.AppBarButtonAutomationPeer |
winrt class |
Exposes AppBarButton types to Microsoft UI Automation.
The Windows Runtime AppBarButton class creates a new AppBarButtonAutomationPeer as its OnCreateAutomationPeer definition. Derive your automation peer from AppBarButtonAutomationPeer if you are deriving a custom class from AppBarButton 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.
AppBarButtonAutomationPeer has overrides of Core methods such that the associated AutomationPeer methods provide peer-specific information to a Microsoft UI Automation client.
- GetClassName returns "AppBarButton".
- GetName does not use the ButtonBaseAutomationPeer behavior that returns a string based on Content. Instead, it looks for a label / LabeledBy value. Otherwise, values from apps should come from AutomationProperties.Name usages in XAML UI definitions, not from values forwarded from the control by the peer. This peer has the base class ButtonAutomationPeer and inherits its behavior other than the overrides indicated above. This includes the pattern support for IInvokeProvider and the GetPattern behavior that returns that pattern when requested, and GetAutomationControlType returns AutomationControlType.Button.
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.