GeneratorPosition Structure
.NET Framework 3.0
GeneratorPosition is used to describe the position of an item that is managed by ItemContainerGenerator.
Namespace: System.Windows.Controls.Primitives
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
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);
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: