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

ItemsControlAutomationPeer class

Exposes ItemsControl types to Microsoft UI Automation.

Inheritance

Object
  DependencyObject
    AutomationPeer
      FrameworkElementAutomationPeer
        ItemsControlAutomationPeer

Syntax


public class ItemsControlAutomationPeer : FrameworkElementAutomationPeer,
    IItemContainerProvider

Members

The ItemsControlAutomationPeer class has these types of members:

Constructors

The ItemsControlAutomationPeer class has these constructors.

ConstructorDescription
ItemsControlAutomationPeer Initializes a new instance of the ItemsControlAutomationPeer class.

 

Methods

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

MethodDescription
CreateItemAutomationPeer Creates a new instance of the ItemAutomationPeer for a data item in the Items collection of this ItemsControl.
FindItemByProperty Retrieves an element by the specified property value.
OnCreateItemAutomationPeer Invoked whenever a new instance of the ItemAutomationPeer is created for a data item in the Items collection of this ItemsControl.

 

Remarks

The Windows Runtime ItemsControl class creates a new ItemsControlAutomationPeer as its OnCreateAutomationPeer definition. Derive your automation peer from ItemsControlAutomationPeer if you are deriving a custom class from ItemsControl 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. Make sure though that there aren't any existing derived classes from ItemsControl that might better suit your scenario. For example, Selector, FlipView, GridView, ComboBox, ListViewBase and ListBox are all a type of ItemsControl. Each of these already has a dedicated automation peer.

Default peer implementation and overrides in ItemsControlAutomationPeer

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

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.

Note  For Windows Phone Store apps, ItemsControlAutomationPeer has methods that support creating item-specific automation peers for data items. See CreateItemAutomationPeer and OnCreateItemAutomationPeer.

ItemsControlAutomationPeer derived classes

ItemsControlAutomationPeer is the parent class for SelectorAutomationPeer.

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
ItemsControl
FrameworkElementAutomationPeer
IItemContainerProvider
Custom automation peers

 

 

Show:
© 2017 Microsoft