Show / Hide Table of Contents

    Interface IStackLayoutComponent

    The stack layout component organizes its children in a one-dimensional line ("stack"), either horizontally, or vertically. The default is a simple vertical layout (top to bottom).

    Inherited Members
    IComponent.Name
    IComponent.Entity
    IComponent.RegistrationType
    IComponent.Init(IEntity, Type)
    IComponent.AfterInit()
    System.IDisposable.Dispose()
    System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    [RequiredComponent(typeof(IInObjectTreeComponent), true)]
    public interface IStackLayoutComponent : IComponent, IDisposable, INotifyPropertyChanged

    Properties

    | Improve this Doc View Source

    AbsoluteSpacing

    Gets or sets the absolute spacing between each item in the layout. This is an extra constant spacing that will be applied on top of the RelativeSpacing. This will either set the X or the Y of the children depending on the Direction of the layout. Set a positive x for left-to-right or negative x for right-to-left. Set a positive y for bottom-to-top or negative y for top-to-bottom.

    Declaration
    float AbsoluteSpacing { get; set; }
    Property Value
    Type Description
    System.Single

    The spacing.

    | Improve this Doc View Source

    CenterLayout

    Gets or sets a value indicating whether this IStackLayoutComponent centers layout around StartLocation. The default is false, meaning that StartLocation will be used as the starting point and not as the center.

    Declaration
    bool CenterLayout { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if center layout; otherwise, false.

    | Improve this Doc View Source

    Direction

    Gets or sets the direction of the layout (horizontal or vertical).

    Declaration
    LayoutDirection Direction { get; set; }
    Property Value
    Type Description
    LayoutDirection

    The direction.

    | Improve this Doc View Source

    EntitiesToIgnore

    Gets a list of entitiy IDs to ignore from the layout.

    Declaration
    IConcurrentHashSet<string> EntitiesToIgnore { get; }
    Property Value
    Type Description
    IConcurrentHashSet<System.String>

    The entities to ignore.

    | Improve this Doc View Source

    LayoutAfterCrop

    Gets or sets whether the layout should account for any cropping made to the inner children. A use-case for this is when laying out a child which crops its children (i.e "your" grandchildren). A use-case for not enabling this (the default) is when you're laying out children inside a scrollable (and cropping) panel.

    Declaration
    bool LayoutAfterCrop { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if layout after crop; otherwise, false.

    | Improve this Doc View Source

    OnLayoutChanged

    An event which fires whenever the layout changes.

    Declaration
    IBlockingEvent OnLayoutChanged { get; }
    Property Value
    Type Description
    IBlockingEvent

    The on layout changed event.

    | Improve this Doc View Source

    RelativeSpacing

    Gets or sets the relative spacing between each item in the layout. This is a factor which will multiply by the size of each item. This will either set the X or the Y of the children depending on the Direction of the layout. Set the X spacing for a width multiplier (1 will assign left-to-right, -1 will assign right-to-left). Set the Y spacing for a height multiplier (1 will assign bottom-to-top, -1 will assign top-to-bottom).

    Declaration
    float RelativeSpacing { get; set; }
    Property Value
    Type Description
    System.Single

    The relative spacing.

    | Improve this Doc View Source

    StartLocation

    Gets or sets the start location, which is the first item in the layout will be placed in that location, unless CenterLayout is enabled (in which case it represents the center point of the layout).

    Declaration
    float StartLocation { get; set; }
    Property Value
    Type Description
    System.Single

    The start location.

    Methods

    | Improve this Doc View Source

    DryRun()

    Performs the calculation of the layout without actually changing anything, and returns the width/height (depending if this is a horizontal/vertical layout) of the potential layout.

    Declaration
    float DryRun()
    Returns
    Type Description
    System.Single

    The width/height of the potential layout.

    | Improve this Doc View Source

    ForceRefreshLayout()

    Forces a layout refresh now (blocking), assuming layout was started. This should only be done from the update thread.

    Declaration
    void ForceRefreshLayout()
    | Improve this Doc View Source

    StartLayout()

    Starts applying the layout to its children (this needs to be called at least once).

    Declaration
    void StartLayout()
    | Improve this Doc View Source

    StopLayout()

    Stops applying the layout to its children.

    Declaration
    void StopLayout()
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX