CreateItemAutomationPeer Method
Collapse the table of content
Expand the table of content

ItemsControlAutomationPeer.CreateItemAutomationPeer Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Creates a new instance of the ItemAutomationPeer for a data item. The item exists in the Items collection of the associated ItemsControl owner.

Namespace:  System.Windows.Automation.Peers
Assembly:  System.Windows (in System.Windows.dll)

protected virtual ItemAutomationPeer CreateItemAutomationPeer(
	Object item
)

Parameters

item
Type: System.Object
The data item that is associated with this ItemAutomationPeer.

Return Value

Type: System.Windows.Automation.Peers.ItemAutomationPeer
An object that exposes the data item to UI automation, or null. See Remarks.

An ItemsControl is capable of containing data items that are not a UIElement, or that do not have an associated peer class per the OnCreateAutomationPeer() implementation. In these cases, CreateItemAutomationPeer returns null.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft