Class GridBase
Represents the base primitive for all the grid-like controls
[DataContract("GridBase")]
public abstract class GridBase : Panel, IUIElementUpdate, IUIElementChildren, IIdentifiable, IScrollAnchorInfo
- Inheritance
-
objectGridBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Fields
ColumnPropertyKey
The key to the Column attached dependency property. This defines the column an item is inserted into.
[DataMemberRange(0, 0)]
[Display(null, "Layout")]
public static readonly PropertyKey<int> ColumnPropertyKey
Field Value
Remarks
The value is coerced in the range [0, MaxValue].
ColumnSpanPropertyKey
The key to the ColumnSpan attached dependency property. This defines the number of columns an item takes.
[DataMemberRange(1, 0)]
[Display(null, "Layout")]
public static readonly PropertyKey<int> ColumnSpanPropertyKey
Field Value
Remarks
The value is coerced in the range [1, MaxValue].
LayerPropertyKey
The key to the Layer attached dependency property. This defines the layer an item is inserted into.
[DataMemberRange(0, 0)]
[Display(null, "Layout")]
public static readonly PropertyKey<int> LayerPropertyKey
Field Value
Remarks
The value is coerced in the range [0, MaxValue].
LayerSpanPropertyKey
The key to the LayerSpan attached dependency property. This defines the number of layers an item takes.
[DataMemberRange(1, 0)]
[Display(null, "Layout")]
public static readonly PropertyKey<int> LayerSpanPropertyKey
Field Value
Remarks
The value is coerced in the range [1, MaxValue].
RowPropertyKey
The key to the Row attached dependency property. This defines the row an item is inserted into.
[DataMemberRange(0, 0)]
[Display(null, "Layout")]
public static readonly PropertyKey<int> RowPropertyKey
Field Value
Remarks
The value is coerced in the range [0, MaxValue].
RowSpanPropertyKey
The key to the RowSpan attached dependency property. This defines the number of rows an item takes.
[DataMemberRange(1, 0)]
[Display(null, "Layout")]
public static readonly PropertyKey<int> RowSpanPropertyKey
Field Value
Remarks
The value is coerced in the range [1, MaxValue].
Properties
ColumnGap
Gets or sets the gap between columns in virtual pixels.
[DataMember]
[Display(null, "Layout")]
public float ColumnGap { get; set; }
Property Value
LayerGap
Gets or sets the gap between layers in virtual pixels.
[DataMember]
[Display(null, "Layout")]
public float LayerGap { get; set; }
Property Value
RowGap
Gets or sets the gap between rows in virtual pixels.
[DataMember]
[Display(null, "Layout")]
public float RowGap { get; set; }
Property Value
Methods
CalculateTotalGapSize(int, int)
Calculates the total gap size for a dimension based on the number of cells.
public float CalculateTotalGapSize(int dimension, int cellCount)
Parameters
dimension
intThe dimension (0=Column, 1=Row, 2=Layer)
cellCount
intThe number of cells in this dimension
Returns
- float
The total gap size
GetElementGridPositions(UIElement)
Get the positions of an element in the grid as an Int3.
protected virtual Int3 GetElementGridPositions(UIElement element)
Parameters
element
UIElementThe element from which extract the position values
Returns
- Int3
The position of the element
GetElementSpanValues(UIElement)
Get an element span values as an Int3.
protected virtual Int3 GetElementSpanValues(UIElement element)
Parameters
element
UIElementThe element from which extract the span values
Returns
- Int3
The span values of the element
GetGapForDimension(int)
Gets the gap value for the specified dimension.
protected float GetGapForDimension(int dimension)
Parameters
dimension
intThe dimension (0=Column, 1=Row, 2=Layer)
Returns
- float
The gap value
GetGaps()
Calculates and returns the spacing gaps between columns, rows, and layers.
protected Vector3 GetGaps()