Struct GeneratorPosition
A user of the ItemContainerGenerator describes positions using this struct.
Some examples:
To start generating forward from the beginning of the item list,
specify position (-1, 0) and direction Forward.
To start generating backward from the end of the list,
specify position (-1, 0) and direction Backward.
To generate the items after the element with index k, specify
position (k, 0) and direction Forward.
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: OpenSilver.dll
Syntax
public struct GeneratorPosition
Constructors
|
Improve this Doc
View Source
GeneratorPosition(Int32, Int32)
Declaration
public GeneratorPosition(int index, int offset)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Int32 |
offset |
|
Properties
|
Improve this Doc
View Source
Index
Index, with respect to realized elements. The special value -1
refers to a fictitious element at the beginning or end of the
the list.
Declaration
public int Index { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Offset
Offset, with respect to unrealized items near the indexed element.
An offset of 0 refers to the indexed element itself, an offset
of 1 refers to the next (unrealized) item, and an offset of -1
refers to the previous item.
Declaration
public int Offset { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object o)
Parameters
Type |
Name |
Description |
System.Object |
o |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.ValueType.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.ValueType.GetHashCode()
|
Improve this Doc
View Source
ToString()
Returns a string representation of the GeneratorPosition
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.ValueType.ToString()
Operators
|
Improve this Doc
View Source
Equality(GeneratorPosition, GeneratorPosition)
Declaration
public static bool operator ==(GeneratorPosition gp1, GeneratorPosition gp2)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Inequality(GeneratorPosition, GeneratorPosition)
Declaration
public static bool operator !=(GeneratorPosition gp1, GeneratorPosition gp2)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Extension Methods