Class Grid
Represents a grid control with adjustable columns, rows and layers.
[DataContract("Grid")]
public class Grid : GridBase, IUIElementUpdate, IUIElementChildren, IIdentifiable, IScrollAnchorInfo- Inheritance
- 
      objectGrid
- Implements
- Inherited Members
- Extension Methods
Constructors
Grid()
public Grid()Properties
ActualColumnDefinitions
The actual definitions of the grid columns.
public StripDefinitionCollection ActualColumnDefinitions { get; }Property Value
Remarks
A grid always has at least one default row definition, even when ColumnDefinitions is empty.
ActualLayerDefinitions
The actual definitions of the grid layers.
public StripDefinitionCollection ActualLayerDefinitions { get; }Property Value
Remarks
A grid always has at least one default row definition, even when LayerDefinitions is empty.
ActualRowDefinitions
The actual definitions of the grid rows.
public StripDefinitionCollection ActualRowDefinitions { get; }Property Value
Remarks
A grid always has at least one default row definition, even when RowDefinitions is empty.
ColumnDefinitions
The definitions of the grid columns.
[DataMember]
[Display(null, "Layout")]
public StripDefinitionCollection ColumnDefinitions { get; }Property Value
LayerDefinitions
The definitions of the grid layers.
[DataMember]
[Display(null, "Layout")]
public StripDefinitionCollection LayerDefinitions { get; }Property Value
RowDefinitions
The definitions of the grid rows.
[DataMember]
[Display(null, "Layout")]
public StripDefinitionCollection RowDefinitions { get; }Property Value
Methods
ArrangeOverride(Vector3)
When overridden in a derived class, positions possible child elements and determines a size for a UIElement derived class.
protected override Vector3 ArrangeOverride(Vector3 finalSizeWithoutMargins)Parameters
- finalSizeWithoutMarginsVector3
- The final area within the parent that this element should use to arrange itself and its children. 
Returns
- Vector3
- The actual size used. 
GetElementGridPositions(UIElement)
Get the positions of an element in the grid as an Int3.
protected override Int3 GetElementGridPositions(UIElement element)Parameters
- elementUIElement
- The 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 override Int3 GetElementSpanValues(UIElement element)Parameters
- elementUIElement
- The element from which extract the span values 
Returns
- Int3
- The span values of the element 
GetSurroudingAnchorDistances(Orientation, float)
Get the distances to the previous and next anchors in the provided direction and from given position.
public override Vector2 GetSurroudingAnchorDistances(Orientation direction, float position)Parameters
- directionOrientation
- The direction in which to anchor 
- positionfloat
- The current scrolling position 
Returns
- Vector2
- The distances to previous and next anchors from to current scroll position 
Remarks
The distance contained in the X component of the returned vector is inferior or equal to 0 and the distance contained in the Y component is superior or equal to 0.
MeasureOverride(Vector3)
When overridden in a derived class, measures the size in layout required for possible child elements and determines a size for the UIElement-derived class.
protected override Vector3 MeasureOverride(Vector3 availableSizeWithoutMargins)Parameters
- availableSizeWithoutMarginsVector3
- The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available. 
Returns
- Vector3
- The size desired by the children 
OnLogicalChildAdded(UIElement, int)
Action to perform when a logical child is added.
protected override void OnLogicalChildAdded(UIElement newElement, int index)Parameters
- newElementUIElement
- The element that has been added 
- indexint
- The index in the collection where the child has been added 
OnLogicalChildRemoved(UIElement, int)
Action to perform when a logical child is removed.
protected override void OnLogicalChildRemoved(UIElement oldElement, int index)