Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    UniformGrid Class

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

    Represents the grid where all the rows and columns have an uniform size.

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

    [DataContract("UniformGrid")]
    public class UniformGrid : GridBase, IUIElementUpdate, IUIElementChildren, IIdentifiable, IScrollAnchorInfo
    Name Description
    Properties
    Columns

    Gets or sets the number of columns that the UniformGrid has.

    Layers

    Gets or sets the number of layers that the UniformGrid has.

    Rows

    Gets or sets the number of rows that the UniformGrid has.

    Methods
    ArrangeOverride(Vector3)
    GetElementGridPositionsAsFloat(UIElement)

    Get the positions of an element in the grid as an Vector3.

    GetElementSpanValuesAsFloat(UIElement)

    Get an element span values as an Vector3.

    GetSurroudingAnchorDistances(Orientation, Single)
    MeasureOverride(Vector3)
    | Improve this Doc View Source

    Properties


    Columns

    Gets or sets the number of columns that the UniformGrid has.

    [DataMember]
    [DataMemberRange(1, 0)]
    [Display(null, "Layout")]
    public int Columns { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    The value is coerced in the range [1, System.Int32.MaxValue].


    Layers

    Gets or sets the number of layers that the UniformGrid has.

    [DataMember]
    [DataMemberRange(1, 0)]
    [Display(null, "Layout")]
    public int Layers { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    The value is coerced in the range [1, System.Int32.MaxValue].


    Rows

    Gets or sets the number of rows that the UniformGrid has.

    [DataMember]
    [DataMemberRange(1, 0)]
    [Display(null, "Layout")]
    public int Rows { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    The value is coerced in the range [1, System.Int32.MaxValue].

    | 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)

    GetElementGridPositionsAsFloat(UIElement)

    Get the positions of an element in the grid as an Vector3.

    protected Vector3 GetElementGridPositionsAsFloat(UIElement element)
    Parameters
    Type Name Description
    UIElement element

    The element from which extract the position values

    Returns
    Type Description
    Vector3

    The position of the element


    GetElementSpanValuesAsFloat(UIElement)

    Get an element span values as an Vector3.

    protected Vector3 GetElementSpanValuesAsFloat(UIElement element)
    Parameters
    Type Name Description
    UIElement element

    The element from which extract the span values

    Returns
    Type Description
    Vector3

    The span values of the element


    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)

    Inherited Members

    GridBase.RowPropertyKey
    GridBase.RowSpanPropertyKey
    GridBase.ColumnPropertyKey
    GridBase.ColumnSpanPropertyKey
    GridBase.LayerPropertyKey
    GridBase.LayerSpanPropertyKey
    GridBase.GetElementSpanValues(UIElement)
    GridBase.GetElementGridPositions(UIElement)
    Panel.ZIndexPropertyKey
    Panel.PanelArrangeMatrixPropertyKey
    Panel.PanelChildrenSorter
    Panel.Children
    Panel.EnumerateChildren()
    Panel.LogicalChildrenChanged(Object, TrackingCollectionChangedEventArgs)
    Panel.OnLogicalChildRemoved(UIElement, Int32)
    Panel.OnLogicalChildAdded(UIElement, Int32)
    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