GeneratorPosition Structure
GeneratorPosition is used to describe the position of an item that is managed by ItemContainerGenerator.
Assembly: PresentationFramework (in PresentationFramework.dll)
| Name | Description | |
|---|---|---|
![]() | GeneratorPosition(Int32, Int32) | Initializes a new instance of GeneratorPosition with the specified index and offset. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Compares the specified instance and the current instance of GeneratorPosition for value equality.(Overrides ValueType.Equals(Object).) |
![]() | GetHashCode() | Returns the hash code for this GeneratorPosition.(Overrides ValueType.GetHashCode().) |
![]() | GetType() | |
![]() | ToString() | Returns a string representation of this instance of GeneratorPosition.(Overrides ValueType.ToString().) |
| Name | Description | |
|---|---|---|
![]() ![]() | Equality(GeneratorPosition, GeneratorPosition) | Compares two GeneratorPosition objects for value equality. |
![]() ![]() | Inequality(GeneratorPosition, GeneratorPosition) | Compares two GeneratorPosition objects for value inequality. |
The following example illustrates how to use GeneratorPosition to start generating forward from the beginning of an item list.
// Start generating items forward from the beginning of the item list GeneratorPosition position = new GeneratorPosition(-1, 0); GeneratorDirection direction = GeneratorDirection.Forward; IItemContainerGenerator generator = (IItemContainerGenerator)this.itemsControl.ItemContainerGenerator; generator.StartAt(position, direction);
The following example illustrates how to use GeneratorPosition to start generating backward from the end of an item list.
// Start generating items backward from the end of the item list GeneratorPosition position = new GeneratorPosition(-1, 0); GeneratorDirection direction = GeneratorDirection.Backward; IItemContainerGenerator generator = (IItemContainerGenerator)this.itemsControl.ItemContainerGenerator; generator.StartAt(position, direction);
The following example illustrates how to use GeneratorPosition to start generating forward from the middle of an item list.
// Start generating items forward, // starting with the first unrealized item (offset of 1), // after the 5th realized item // (the item with index 4 among all realized items) in the list GeneratorPosition position = new GeneratorPosition(4, 1); GeneratorDirection direction = GeneratorDirection.Forward; IItemContainerGenerator generator = (IItemContainerGenerator)this.itemsControl.ItemContainerGenerator; generator.StartAt(position, direction);
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



