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

SelectorAutomationPeer class

A base class that provides a Microsoft UI Automation peer implementation for types that derive from Selector.

Inheritance

Object
  DependencyObject
    AutomationPeer
      FrameworkElementAutomationPeer
        ItemsControlAutomationPeer
          SelectorAutomationPeer

Syntax


public class SelectorAutomationPeer : ItemsControlAutomationPeer,
    IItemContainerProvider,
    ISelectionProvider

Members

The SelectorAutomationPeer class has these types of members:

Constructors

The SelectorAutomationPeer class has these constructors.

ConstructorDescription
SelectorAutomationPeer Initializes a new instance of the SelectorAutomationPeer class.

 

Methods

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

MethodDescription
GetSelection Retrieves a Microsoft UI Automation provider for each child element that is selected.

 

Properties

The SelectorAutomationPeer class has these properties.

PropertyAccess typeDescription

CanSelectMultiple

Read-only

Gets a value that indicates whether the Microsoft UI Automation provider allows more than one child element to be selected concurrently.

IsSelectionRequired

Read-only

Gets a value that indicates whether the Microsoft UI Automation provider requires at least one child element to be selected.

 

Remarks

The Windows Runtime Selector class creates a new SelectorAutomationPeer as part of internal logic that checks for listeners of certain automation events. Selector doesn't have an OnCreateAutomationPeer that automatically hooks up the peer on creation, because Selector is usually a base class.

Selector has several derived classes such as ListBox, 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 Selector, directly, derive your automation peer from SelectorAutomationPeer and override OnCreateAutomationPeer so that it returns your custom peer.

Default peer implementation and overrides in SelectorAutomationPeer

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

This peer raises selection-related automation events on behalf of its owner class.

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.

SelectorAutomationPeer derived classes

SelectorAutomationPeer is the parent class for these classes:

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
Selector
ItemsControlAutomationPeer
IItemContainerProvider
ISelectionProvider
Custom automation peers

 

 

Show:
© 2016 Microsoft