ItemsControlAutomationPeer.CreateItemAutomationPeer Method
[ 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.
Assembly: System.Windows (in System.Windows.dll)
'Declaration Protected Overridable Function CreateItemAutomationPeer ( _ item As Object _ ) As ItemAutomationPeer
Parameters
- item
- Type: System.Object
The data item that is associated with this ItemAutomationPeer.
Return Value
Type: System.Windows.Automation.Peers.ItemAutomationPeerAn 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.