ButtonAutomationPeer class
TOC
Collapse the table of content
Expand the table of content

ButtonAutomationPeer class

Exposes Button types to Microsoft UI Automation.

Inheritance

Object
  DependencyObject
    AutomationPeer
      FrameworkElementAutomationPeer
        ButtonBaseAutomationPeer
          ButtonAutomationPeer

Syntax


public class ButtonAutomationPeer : ButtonBaseAutomationPeer,
    IInvokeProvider

Members

The ButtonAutomationPeer class has these types of members:

Constructors

The ButtonAutomationPeer class has these constructors.

ConstructorDescription
ButtonAutomationPeer Initializes a new instance of the ButtonAutomationPeer class.

 

Methods

The ButtonAutomationPeer class has these methods. It also inherits methods from the Object class.

MethodDescription
Invoke Sends a request to activate a control and initiate its single, unambiguous action.

 

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

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml.Automation.Peers
Windows::UI::Xaml::Automation::Peers [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Automation.Peers
Windows::UI::Xaml::Automation::Peers [C++]

Metadata

Windows.winmd

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

See also

Object
ButtonBaseAutomationPeer
IInvokeProvider
Button
Custom automation peers

 

 

Show:
© 2016 Microsoft