I​Item​Container​Mapping I​Item​Container​Mapping I​Item​Container​Mapping Interface

Definition

Provides methods that let an ItemsControl map data items to UI containers.

public : interface IItemContainerMappingpublic interface IItemContainerMappingPublic Interface IItemContainerMapping
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Methods

ContainerFromIndex(Int32) ContainerFromIndex(Int32) ContainerFromIndex(Int32)

Returns the container for the item at the specified index within the ItemCollection.

public : DependencyObject ContainerFromIndex(int index)public DependencyObject ContainerFromIndex(Int32 index)Public Function ContainerFromIndex(index As Int32) As DependencyObject
Parameters
index
int Int32 Int32

The index of the item to retrieve.

Returns

The container for the item at the specified index within the item collection, if the item has a container; otherwise, null.

Attributes

ContainerFromItem(Object) ContainerFromItem(Object) ContainerFromItem(Object)

Returns the container corresponding to the specified item.

public : DependencyObject ContainerFromItem(PlatForm::Object item)public DependencyObject ContainerFromItem(Object item)Public Function ContainerFromItem(item As Object) As DependencyObject
Parameters
item
PlatForm::Object Object Object

The item to retrieve the container for.

Returns

A container that corresponds to the specified item, if the item has a container and exists in the collection; otherwise, null.

Attributes

IndexFromContainer(DependencyObject) IndexFromContainer(DependencyObject) IndexFromContainer(DependencyObject)

Returns the index to the item that has the specified, generated container.

public : int IndexFromContainer(DependencyObject container)public int IndexFromContainer(DependencyObject container)Public Function IndexFromContainer(container As DependencyObject) As int
Parameters
container
DependencyObject DependencyObject DependencyObject

The generated container to retrieve the item index for.

Returns
int int int

The index to the item that corresponds to the specified generated container.

Attributes

ItemFromContainer(DependencyObject) ItemFromContainer(DependencyObject) ItemFromContainer(DependencyObject)

Returns the item that corresponds to the specified, generated container.

public : PlatForm::Object ItemFromContainer(DependencyObject container)public object ItemFromContainer(DependencyObject container)Public Function ItemFromContainer(container As DependencyObject) As object
Parameters
container
DependencyObject DependencyObject DependencyObject

The DependencyObject that corresponds to the item to be returned.

Returns
PlatForm::Object object object

The contained item, or the container if it does not contain an item.

Attributes