Interface IItemContainerGenerator
An interface that is implemented by classes which are responsible for generating UI content on behalf of a host.
Namespace: System.Windows.Controls.Primitives
Assembly: OpenSilver.dll
Syntax
public interface IItemContainerGenerator
Methods
| Improve this Doc View SourceGenerateNext(out Boolean)
Returns the container element used to display the next item, and whether the container element has been newly generated (realized).
Declaration
DependencyObject GenerateNext(out bool isNewlyRealized)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isNewlyRealized | Is true if the returned DependencyObject is newly generated (realized); otherwise, false. |
Returns
Type | Description |
---|---|
DependencyObject | A DependencyObject that is the container element which is used to display the next item. |
GeneratorPositionFromIndex(Int32)
Returns the GeneratorPosition object that maps to the item at the specified index.
Declaration
GeneratorPosition GeneratorPositionFromIndex(int itemIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | itemIndex | The index of desired item. |
Returns
Type | Description |
---|---|
GeneratorPosition | An GeneratorPosition object that maps to the item at the specified index. |
GetItemContainerGeneratorForPanel(Panel)
Returns the ItemContainerGenerator appropriate for use by the specified panel.
Declaration
ItemContainerGenerator GetItemContainerGeneratorForPanel(Panel panel)
Parameters
Type | Name | Description |
---|---|---|
Panel | panel | The panel for which to return an appropriate ItemContainerGenerator. |
Returns
Type | Description |
---|---|
ItemContainerGenerator | An ItemContainerGenerator appropriate for use by the specified panel. |
IndexFromGeneratorPosition(GeneratorPosition)
Returns the index that maps to the specified GeneratorPosition.
Declaration
int IndexFromGeneratorPosition(GeneratorPosition position)
Parameters
Type | Name | Description |
---|---|---|
GeneratorPosition | position | The index of desired item. The GeneratorPosition for the desired index. |
Returns
Type | Description |
---|---|
System.Int32 | An System.Int32 that is the index which maps to the specified GeneratorPosition. |
PrepareItemContainer(DependencyObject)
Prepares the specified element as the container for the corresponding item.
Declaration
void PrepareItemContainer(DependencyObject container)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | container | The container to prepare. Normally, container is the result of the previous call to GenerateNext(out Boolean). |
Remove(GeneratorPosition, Int32)
Removes one or more generated (realized) items.
Declaration
void Remove(GeneratorPosition position, int count)
Parameters
Type | Name | Description |
---|---|---|
GeneratorPosition | position | The System.Int32 index of the element to remove. position must refer to a previously generated (realized) item, which means its offset must be zero. |
System.Int32 | count | The System.Int32 number of elements to remove, starting at position. |
RemoveAll()
Removes all generated (realized) items.
Declaration
void RemoveAll()
StartAt(GeneratorPosition, GeneratorDirection, Boolean)
Prepares the generator to generate items, starting at the specified GeneratorPosition, and in the specified GeneratorDirection, and controlling whether or not to start at a generated (realized) item.
Declaration
IDisposable StartAt(GeneratorPosition position, GeneratorDirection direction, bool allowStartAtRealizedItem)
Parameters
Type | Name | Description |
---|---|---|
GeneratorPosition | position | A GeneratorPosition, that specifies the position of the item to start generating items at. |
GeneratorDirection | direction | Specifies the position of the item to start generating items at. |
System.Boolean | allowStartAtRealizedItem | A System.Boolean that specifies whether to start at a generated (realized) item. |
Returns
Type | Description |
---|---|
System.IDisposable | An System.IDisposable object that tracks the lifetime of the generation process. |