ItemContainerGenerator class

Applies to Windows and Windows Phone

Provides mappings between the items of an ItemsControl and their container elements.

Inheritance

Object
  ItemContainerGenerator

Syntax


public ref class ItemContainerGenerator sealed 

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The ItemContainerGenerator class has these types of members:

Events

The ItemContainerGenerator class has these events.

EventDescription
ItemsChanged Occurs when the contents of the items collection changes.

 

Methods

The ItemContainerGenerator class has these methods. It also inherits methods from the Object class.

MethodDescription
ContainerFromIndex Returns the container for the item at the specified index within the ItemCollection.
ContainerFromItem Returns the container corresponding to the specified item.
GenerateNext Returns the container element used to display the next item, and indicates whether the container element has been newly generated (realized).
GeneratorPositionFromIndex Gets the generated position of the item at the specified index.
GetItemContainerGeneratorForPanel Returns the ItemContainerGenerator that is appropriate for use by the specified panel.
IndexFromContainer Returns the index to the item that has the specified, generated container.
IndexFromGeneratorPosition Returns the index that maps to the specified GeneratorPosition.
ItemFromContainer Returns the item that corresponds to the specified, generated container.
PrepareItemContainer Prepares the specified element as the container for the corresponding item.
Recycle Disassociates item containers from their data items and saves the containers so they can be reused later for other data items.
Remove Removes one or more generated (realized) items.
RemoveAll Removes all generated (realized) items.
StartAt Prepares the generator to generate items, starting at the specified GeneratorPosition and moving in the specified GeneratorDirection. This method also controls whether or not to start at a generated (realized) item.
Stop Disposes the ItemContainerGenerator.

 

Remarks

You set an ItemContainerGenerator as the value of the ItemsControl.ItemContainerGenerator property.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

ItemsControl.ItemContainerGenerator

 

 

Show:
© 2014 Microsoft