Class ItemContainerGenerator
Wraps the ItemsContainerGenerator that comes with the System.Windows.ItemsControl and adds a Status property and StatusChanged event.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.dll
Syntax
public sealed class ItemContainerGenerator : Object, IRecyclingItemContainerGenerator, IItemContainerGenerator
Constructors
ItemContainerGenerator(ItemContainerGenerator)
Initializes a new instance of the ItemContainerGenerator class.
Declaration
public ItemContainerGenerator(ItemContainerGenerator originalGenerator)
Parameters
System.Windows.Controls.ItemContainerGenerator
originalGenerator
The original generator. |
Properties
Status
The generation status of the ItemContainerGenerator.
Declaration
public GeneratorStatus Status { get; }
Property Value
GeneratorStatus
|
Methods
ContainerFromIndex(Int32)
Returns the container for the given item index.
Declaration
public DependencyObject ContainerFromIndex(int index)
Parameters
System.Int32
index
The index of the item. |
Returns
System.Windows.DependencyObject
The container for the item at the given index. |
ContainerFromItem(Object)
Returns the container for the given item of the ItemsControl.
Declaration
public DependencyObject ContainerFromItem(object item)
Parameters
System.Object
item
The item for which it finds the container. |
Returns
System.Windows.DependencyObject
Returns null if not found. |
GeneratorPositionFromIndex(Int32)
Returns the Generator position for the given index.
Declaration
public GeneratorPosition GeneratorPositionFromIndex(int itemIndex)
Parameters
System.Int32
itemIndex
The index to return Generator position for. |
Returns
System.Windows.Controls.Primitives.GeneratorPosition
An System.Int32 that is the index which maps to the specified System.Windows.Controls.Primitives.GeneratorPosition. |
IndexFromContainer(DependencyObject)
Returns the index of the given container.
Declaration
public int IndexFromContainer(DependencyObject container)
Parameters
System.Windows.DependencyObject
container
The container for which to get the index. |
Returns
System.Int32
The index of the container. |
IndexFromGeneratorPosition(GeneratorPosition)
Returns the index that maps to the specified System.Windows.Controls.Primitives.GeneratorPosition.
Declaration
public int IndexFromGeneratorPosition(GeneratorPosition position)
Parameters
System.Windows.Controls.Primitives.GeneratorPosition
position
The index of desired item.The System.Windows.Controls.Primitives.GeneratorPosition for the desired index. |
Returns
System.Int32
An System.Int32 that is the index which maps to the specified System.Windows.Controls.Primitives.GeneratorPosition. |
ItemFromContainer(DependencyObject)
Returns the item for the given container.
Declaration
public object ItemFromContainer(DependencyObject container)
Parameters
System.Windows.DependencyObject
container
The container for which to get an item. |
Returns
System.Object
Returns the item for the container. |
Events
ItemsChanged
Invoked when the items of the ItemsControl change, called before the OnItemsChanged override.
Declaration
public event ItemsChangedEventHandler ItemsChanged
Event Type
System.Windows.Controls.Primitives.ItemsChangedEventHandler
|
StatusChanged
The StatusChanged event is raised by a ItemContainerGenerator to inform controls that its status has changed.
Declaration
public event EventHandler StatusChanged
Event Type
System.EventHandler
|