ItemsControlAutomationPeer
ItemsControlAutomationPeer
ItemsControlAutomationPeer
ItemsControlAutomationPeer
Class
Definition
Exposes ItemsControl types to Microsoft UI Automation.
public : class ItemsControlAutomationPeer : FrameworkElementAutomationPeer, IItemsControlAutomationPeer, IItemsControlAutomationPeer2, IItemsControlAutomationPeerOverrides2, IItemContainerProviderpublic class ItemsControlAutomationPeer : FrameworkElementAutomationPeer, IItemsControlAutomationPeer, IItemsControlAutomationPeer2, IItemsControlAutomationPeerOverrides2, IItemContainerProviderPublic Class ItemsControlAutomationPeer Inherits FrameworkElementAutomationPeer Implements IItemsControlAutomationPeer, IItemsControlAutomationPeer2, IItemsControlAutomationPeerOverrides2, IItemContainerProvider// This API is not available in Javascript.
- Inheritance
-
FrameworkElementAutomationPeerFrameworkElementAutomationPeerFrameworkElementAutomationPeerFrameworkElementAutomationPeerItemsControlAutomationPeerItemsControlAutomationPeerItemsControlAutomationPeerItemsControlAutomationPeer
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Inherited Members
Inherited methods
Inherited properties
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 Microsoft UI Automation client.
- GetPattern reports that the peer provides pattern support for PatternInterface.ItemContainer (IItemContainerProvider ). Also, there's logic that looks for scrolling behavior in the owner. If there's scrolling available and a peer can be forwarded to provide the control pattern, the peer can support PatternInterface.Scroll (IScrollProvider ).
- There is no GetClassName and GetAutomationControlType is Custom. These values are expected to come from derived peers.
- GetChildren has an extensive implementation that returns the item peers and is used by all the derived peers. 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.
For Windows Phone Store app, 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.
Constructors
ItemsControlAutomationPeer(ItemsControl) ItemsControlAutomationPeer(ItemsControl) ItemsControlAutomationPeer(ItemsControl) ItemsControlAutomationPeer(ItemsControl)
Initializes a new instance of the ItemsControlAutomationPeer class.
public : ItemsControlAutomationPeer(ItemsControl owner)public ItemsControlAutomationPeer(ItemsControl owner)Public Sub New(owner As ItemsControl)// This API is not available in Javascript.
The owner element to create for.
Methods
CreateItemAutomationPeer(Object) CreateItemAutomationPeer(Object) CreateItemAutomationPeer(Object) CreateItemAutomationPeer(Object)
Creates a new instance of the ItemAutomationPeer for a data item in the Items collection of this ItemsControl.
public : ItemAutomationPeer CreateItemAutomationPeer(PlatForm::Object item)public ItemAutomationPeer CreateItemAutomationPeer(Object item)Public Function CreateItemAutomationPeer(item As Object) As ItemAutomationPeer// This API is not available in Javascript.
- item
- PlatForm::Object Object Object Object
The data item that is associated with this ItemAutomationPeer.
FindItemByProperty(IRawElementProviderSimple, AutomationProperty, Object) FindItemByProperty(IRawElementProviderSimple, AutomationProperty, Object) FindItemByProperty(IRawElementProviderSimple, AutomationProperty, Object) FindItemByProperty(IRawElementProviderSimple, AutomationProperty, Object)
Retrieves an element by the specified property value.
public : IRawElementProviderSimple FindItemByProperty(IRawElementProviderSimple startAfter, AutomationProperty automationProperty, PlatForm::Object value)public IRawElementProviderSimple FindItemByProperty(IRawElementProviderSimple startAfter, AutomationProperty automationProperty, Object value)Public Function FindItemByProperty(startAfter As IRawElementProviderSimple, automationProperty As AutomationProperty, value As Object) As IRawElementProviderSimple// This API is not available in Javascript.
- startAfter
- IRawElementProviderSimple IRawElementProviderSimple IRawElementProviderSimple IRawElementProviderSimple
The item in the container after which to begin the search.
- automationProperty
- AutomationProperty AutomationProperty AutomationProperty AutomationProperty
The property that contains the value to retrieve.
- value
- PlatForm::Object Object Object Object
The value to retrieve.
The first item that matches the search criterion if such an item exists; otherwise, null.
OnCreateItemAutomationPeer(Object) OnCreateItemAutomationPeer(Object) OnCreateItemAutomationPeer(Object) OnCreateItemAutomationPeer(Object)
Invoked whenever a new instance of the ItemAutomationPeer is created for a data item in the Items collection of this ItemsControl.
protected : virtual ItemAutomationPeer OnCreateItemAutomationPeer(PlatForm::Object item)protected virtual ItemAutomationPeer OnCreateItemAutomationPeer(Object item)Protected Overridable Function OnCreateItemAutomationPeer(item As Object) As ItemAutomationPeer// This API is not available in Javascript.
- item
- PlatForm::Object Object Object Object
The data item that is associated with this ItemAutomationPeer.