Windows Dev Center

ItemContainerGenerator.ContainerFromItem Method

Returns the container corresponding to the specified item.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Public Function ContainerFromItem ( _
	item As Object _
) As DependencyObject

Parameters

item
Type: System.Object
The item to retrieve the container for.

Return Value

Type: System.Windows.DependencyObject
A container that corresponds to the specified item, if the item has a container and exists in the collection; otherwise, Nothing.

If the specified item does not belong to the item collection, or there is no container for it, the ContainerFromItem method returns Nothing.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2015 Microsoft