Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    Grid Class

    Namespace: Stride.UI.Panels
    Assembly: Stride.UI.dll

    Represents a grid control with adjustable columns, rows and layers.

    System.Object → UIElement → Panel → GridBase → Grid
    Derived from Grid:

    [DataContract("Grid")]
    public class Grid : GridBase, IUIElementUpdate, IUIElementChildren, IIdentifiable, IScrollAnchorInfo
    Name Description
    Constructors
    Grid()
    Properties
    ActualColumnDefinitions

    The actual definitions of the grid columns.

    ActualLayerDefinitions

    The actual definitions of the grid layers.

    ActualRowDefinitions

    The actual definitions of the grid rows.

    ColumnDefinitions

    The definitions of the grid columns.

    LayerDefinitions

    The definitions of the grid layers.

    RowDefinitions

    The definitions of the grid rows.

    Methods
    ArrangeOverride(Vector3)
    GetElementGridPositions(UIElement)
    GetElementSpanValues(UIElement)
    GetSurroudingAnchorDistances(Orientation, Single)
    MeasureOverride(Vector3)
    OnLogicalChildAdded(UIElement, Int32)
    OnLogicalChildRemoved(UIElement, Int32)
    | Improve this Doc View Source

    Constructors


    Grid()

    public Grid()
    | Improve this Doc View Source

    Properties


    ActualColumnDefinitions

    The actual definitions of the grid columns.

    public StripDefinitionCollection ActualColumnDefinitions { get; }
    Property Value
    Type Description
    StripDefinitionCollection
    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
    Type Description
    StripDefinitionCollection
    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
    Type Description
    StripDefinitionCollection
    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
    Type Description
    StripDefinitionCollection

    LayerDefinitions

    The definitions of the grid layers.

    [DataMember]
    [Display(null, "Layout")]
    public StripDefinitionCollection LayerDefinitions { get; }
    Property Value
    Type Description
    StripDefinitionCollection

    RowDefinitions

    The definitions of the grid rows.

    [DataMember]
    [Display(null, "Layout")]
    public StripDefinitionCollection RowDefinitions { get; }
    Property Value
    Type Description
    StripDefinitionCollection
    | Improve this Doc View Source

    Methods


    ArrangeOverride(Vector3)

    protected override Vector3 ArrangeOverride(Vector3 finalSizeWithoutMargins)
    Parameters
    Type Name Description
    Vector3 finalSizeWithoutMargins
    Returns
    Type Description
    Vector3
    Overrides
    UIElement.ArrangeOverride(Vector3)

    GetElementGridPositions(UIElement)

    protected override Int3 GetElementGridPositions(UIElement element)
    Parameters
    Type Name Description
    UIElement element
    Returns
    Type Description
    Int3
    Overrides
    GridBase.GetElementGridPositions(UIElement)

    GetElementSpanValues(UIElement)

    protected override Int3 GetElementSpanValues(UIElement element)
    Parameters
    Type Name Description
    UIElement element
    Returns
    Type Description
    Int3
    Overrides
    GridBase.GetElementSpanValues(UIElement)

    GetSurroudingAnchorDistances(Orientation, Single)

    public override Vector2 GetSurroudingAnchorDistances(Orientation direction, float position)
    Parameters
    Type Name Description
    Orientation direction
    System.Single position
    Returns
    Type Description
    Vector2
    Overrides
    Panel.GetSurroudingAnchorDistances(Orientation, Single)

    MeasureOverride(Vector3)

    protected override Vector3 MeasureOverride(Vector3 availableSizeWithoutMargins)
    Parameters
    Type Name Description
    Vector3 availableSizeWithoutMargins
    Returns
    Type Description
    Vector3
    Overrides
    UIElement.MeasureOverride(Vector3)

    OnLogicalChildAdded(UIElement, Int32)

    protected override void OnLogicalChildAdded(UIElement newElement, int index)
    Parameters
    Type Name Description
    UIElement newElement
    System.Int32 index
    Overrides
    Panel.OnLogicalChildAdded(UIElement, Int32)

    OnLogicalChildRemoved(UIElement, Int32)

    protected override void OnLogicalChildRemoved(UIElement oldElement, int index)
    Parameters
    Type Name Description
    UIElement oldElement
    System.Int32 index
    Overrides
    Panel.OnLogicalChildRemoved(UIElement, Int32)

    Inherited Members

    GridBase.RowPropertyKey
    GridBase.RowSpanPropertyKey
    GridBase.ColumnPropertyKey
    GridBase.ColumnSpanPropertyKey
    GridBase.LayerPropertyKey
    GridBase.LayerSpanPropertyKey
    Panel.ZIndexPropertyKey
    Panel.PanelArrangeMatrixPropertyKey
    Panel.PanelChildrenSorter
    Panel.Children
    Panel.EnumerateChildren()
    Panel.LogicalChildrenChanged(Object, TrackingCollectionChangedEventArgs)
    Panel.UpdateWorldMatrix(Matrix, Boolean)
    Panel.ActivateAnchoring(Orientation, Boolean)
    Panel.ShouldAnchor(Orientation)
    Panel.ScrollOwner
    UIElement.InputCategory
    UIElement.PanelCategory
    UIElement.AppearanceCategory
    UIElement.BehaviorCategory
    UIElement.LayoutCategory
    UIElement.MiscCategory
    UIElement.MarginInternal
    UIElement.ArrangeChanged
    UIElement.LocalMatrixChanged
    UIElement.Id
    UIElement.DependencyProperties
    UIElement.LocalMatrix
    UIElement.BackgroundColor
    UIElement.Opacity
    UIElement.Visibility
    UIElement.ClipToBounds
    UIElement.DrawLayerNumber
    UIElement.IsEnabled
    UIElement.CanBeHitByUser
    UIElement.Width
    UIElement.Height
    UIElement.Depth
    UIElement.Size
    UIElement.HorizontalAlignment
    UIElement.VerticalAlignment
    UIElement.DepthAlignment
    UIElement.Margin
    UIElement.MinimumWidth
    UIElement.MinimumHeight
    UIElement.MinimumDepth
    UIElement.MaximumWidth
    UIElement.MaximumHeight
    UIElement.MaximumDepth
    UIElement.DefaultWidth
    UIElement.DefaultHeight
    UIElement.DefaultDepth
    UIElement.Name
    UIElement.DesiredSize
    UIElement.DesiredSizeWithMargins
    UIElement.IsArrangeValid
    UIElement.IsMeasureValid
    UIElement.WorldMatrix
    UIElement.DepthBias
    UIElement.LayoutingContext
    UIElement.VisualChildrenCollection
    UIElement.InvalidateArrange()
    UIElement.InvalidateMeasure()
    UIElement.OnNameChanged()
    UIElement.IsHierarchyEnabled
    UIElement.IsVisible
    UIElement.IsCollapsed
    UIElement.Parent
    UIElement.VisualParent
    UIElement.VisualChildren
    UIElement.HitableChildren
    UIElement.RenderOpacity
    UIElement.RenderSize
    UIElement.RenderOffsets
    UIElement.ActualWidth
    UIElement.ActualHeight
    UIElement.ActualDepth
    UIElement.IUIElementChildren.Children
    UIElement.Measure(Vector3)
    UIElement.Arrange(Vector3, Boolean)
    UIElement.CollapseOverride()
    UIElement.PropagateCollapseToChild(UIElement)
    UIElement.FindName(String)
    UIElement.SetParent(UIElement, UIElement)
    UIElement.SetVisualParent(UIElement, UIElement)
    UIElement.Intersects(Ray, Vector3)
    UIElement.IUIElementUpdate.Update(GameTime)
    UIElement.IUIElementUpdate.UpdateWorldMatrix(Matrix, Boolean)
    UIElement.IUIElementUpdate.UpdateElementState(Int32)
    UIElement.Update(GameTime)
    UIElement.CalculateSizeWithThickness(Vector3, Thickness)
    UIElement.CalculateSizeWithoutThickness(Vector3, Thickness)
    UIElement.CalculateAdjustmentOffsets(Thickness, Vector3, Vector3)
    UIElement.IsTouched
    UIElement.MouseOverState
    UIElement.RequiresMouseOverUpdate
    UIElement.RaiseEvent(RoutedEventArgs)
    UIElement.AddHandler<T>(RoutedEvent<T>, EventHandler<T>, Boolean)
    UIElement.RemoveHandler<T>(RoutedEvent<T>, EventHandler<T>)
    UIElement.MouseOverStateChanged
    UIElement.PreviewTouchDown
    UIElement.PreviewTouchMove
    UIElement.PreviewTouchUp
    UIElement.TouchDown
    UIElement.TouchEnter
    UIElement.TouchLeave
    UIElement.TouchMove
    UIElement.TouchUp
    UIElement.OnPreviewTouchDown(TouchEventArgs)
    UIElement.OnPreviewTouchMove(TouchEventArgs)
    UIElement.OnPreviewTouchUp(TouchEventArgs)
    UIElement.OnTouchDown(TouchEventArgs)
    UIElement.OnTouchEnter(TouchEventArgs)
    UIElement.OnTouchLeave(TouchEventArgs)
    UIElement.OnTouchMove(TouchEventArgs)
    UIElement.OnTouchUp(TouchEventArgs)

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    UIElementExtensions.SetPanelZIndex(UIElement, Int32)
    UIElementExtensions.GetPanelZIndex(UIElement)
    UIElementExtensions.SetCanvasRelativeSize(UIElement, Vector3)
    UIElementExtensions.GetCanvasRelativeSize(UIElement)
    UIElementExtensions.SetCanvasRelativePosition(UIElement, Vector3)
    UIElementExtensions.GetCanvasRelativePosition(UIElement)
    UIElementExtensions.SetCanvasAbsolutePosition(UIElement, Vector3)
    UIElementExtensions.GetCanvasAbsolutePosition(UIElement)
    UIElementExtensions.SetCanvasPinOrigin(UIElement, Vector3)
    UIElementExtensions.GetCanvasPinOrigin(UIElement)
    UIElementExtensions.SetGridColumn(UIElement, Int32)
    UIElementExtensions.GetGridColumn(UIElement)
    UIElementExtensions.SetGridRow(UIElement, Int32)
    UIElementExtensions.GetGridRow(UIElement)
    UIElementExtensions.SetGridLayer(UIElement, Int32)
    UIElementExtensions.GetGridLayer(UIElement)
    UIElementExtensions.SetGridColumnSpan(UIElement, Int32)
    UIElementExtensions.GetGridColumnSpan(UIElement)
    UIElementExtensions.SetGridRowSpan(UIElement, Int32)
    UIElementExtensions.GetGridRowSpan(UIElement)
    UIElementExtensions.SetGridLayerSpan(UIElement, Int32)
    UIElementExtensions.GetGridLayerSpan(UIElement)
    VisualTreeHelper.FindVisualChildOfType<T>(UIElement, String)
    VisualTreeHelper.FindVisualChildrenOfType<T>(UIElement)
    VisualTreeHelper.FindVisualParentOfType<T>(UIElement)
    VisualTreeHelper.FindVisualRoot(UIElement)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation