Class Box

    Definition

    Namespace:
    ElmSharp
    Assembly:
    ElmSharp.dll

    The Box is a container that is used to arrange UI components in a linear order.

    [Obsolete("This has been deprecated in API12")]
    public class Box : Container, IAccessibleObject
    Inheritance
    object
    EvasObject
    AccessibleObject
    Widget
    Container
    Box
    Implements
    IAccessibleObject

    Constructors

    View Source

    Box(EvasObject)

    Creates and initializes a new instance of the Box class.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public Box(EvasObject parent)
    Parameters
    Type Name Description
    EvasObject parent

    The EvasObject to which the new Box will be attached as a child.

    Properties

    View Source

    IsHomogeneous

    Sets or gets whether the box has to arrange its children homogeneously.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public bool IsHomogeneous { get; set; }
    Property Value
    Type Description
    bool
    View Source

    IsHorizontal

    Sets or gets the IsHorizontal value, which describe the pack direction. Vertical is default.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public bool IsHorizontal { get; set; }
    Property Value
    Type Description
    bool

    Methods

    View Source

    Clear()

    Clears the box's of all the children. Remove all the elements contained by the box, deleting the respective objects.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void Clear()
    View Source

    CreateHandle(EvasObject)

    Creates a widget handle.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    protected override IntPtr CreateHandle(EvasObject parent)
    Parameters
    Type Name Description
    EvasObject parent

    Parent EvasObject.

    Returns
    Type Description
    System.IntPtr

    Handle IntPtr.

    Overrides
    EvasObject.CreateHandle(EvasObject)
    View Source

    GetPartColor(string)

    Gets the color of the exact part of the box's layout parent.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public override Color GetPartColor(string part)
    Parameters
    Type Name Description
    string part

    The name of part class, it could be 'bg', 'elm.swllow.content'.

    Returns
    Type Description
    Color
    Overrides
    Widget.GetPartColor(string)
    View Source

    PackAfter(EvasObject, EvasObject)

    Adds a "content" object to the box after the "after" object.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void PackAfter(EvasObject content, EvasObject after)
    Parameters
    Type Name Description
    EvasObject content

    The object will be added in the box.

    EvasObject after

    The object has been added in the box.

    Remarks

    This will add the "content" to the box indicated after the object indicated with "after". If "after" is not already in the box, the results are undefined. After means either to the right of the "after" object or below it, depending on orientation.

    View Source

    PackBefore(EvasObject, EvasObject)

    Adds a "content" object to the box before the "before" object.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void PackBefore(EvasObject content, EvasObject before)
    Parameters
    Type Name Description
    EvasObject content

    The object will be added in the box.

    EvasObject before

    The object has been added in the box.

    Remarks

    This will add the "content" to the box indicated before the object indicated with "before". If "before" is not already in the box, the results are undefined. Before means either to the left of the "before" object or below it, depending on orientation.

    View Source

    PackEnd(EvasObject)

    Adds an object at the end of the pack list.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void PackEnd(EvasObject content)
    Parameters
    Type Name Description
    EvasObject content

    The oject to be packed.

    Remarks

    Packs the "content" object into the Box, placing it last in the list of children objects. The actual position of the object will get on the screen depending on the layout used. If no custom layout is set, it will be at the bottom or right, depending if the Box is vertical or horizontal, respectively.

    View Source

    PackStart(EvasObject)

    Adds a "content" object to the beginning of the pack list.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void PackStart(EvasObject content)
    Parameters
    Type Name Description
    EvasObject content

    The object to be packed.

    Remarks

    Packs the "content" object into the box object, placing it first in the list of children objects. The actual position of the object will get on the screen depending on the layout used. If no custom layout is set, it will be at the top or left, depending if the Box is vertical or horizontal, respectively.

    View Source

    Recalculate()

    Forces the box to recalculate its children packing. If any children were added or removed, the box will not calculate the values immediately, rather leaving it to the next main loop iteration. While this is great as it would save lots of recalculation, whenever you need to get the position of a just added item, you must force recalculate before doing so.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void Recalculate()
    View Source

    SetBoxAlignment(double, double)

    Sets or gets the alignment of the whole bounding box of contents.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void SetBoxAlignment(double horizontal, double vertical)
    Parameters
    Type Name Description
    double horizontal

    Horizontal alignment.

    double vertical

    Vertical alignment.

    View Source

    SetLayoutCallback(Action)

    Whenever any changes that requires the box in object to recalculate the size and position of its elements, the function cb will be called to determine what the layout of the children will be.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void SetLayoutCallback(Action action)
    Parameters
    Type Name Description
    System.Action action

    The callback function used for layout.

    View Source

    SetPadding(int, int)

    Sets or gets the space (padding) between the box's elements.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void SetPadding(int horizontal, int vertical)
    Parameters
    Type Name Description
    int horizontal

    Horizontal padding.

    int vertical

    Vertical padding.

    View Source

    SetPartColor(string, Color)

    Sets the color of the exact part to the box's layout parent.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public override void SetPartColor(string part, Color color)
    Parameters
    Type Name Description
    string part

    The name of part class, it could be 'bg', 'elm.swllow.content'.

    Color color

    The color value.

    Overrides
    Widget.SetPartColor(string, Color)
    View Source

    UnPack(EvasObject)

    Removes the "content" object from the box without deleting it.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void UnPack(EvasObject content)
    Parameters
    Type Name Description
    EvasObject content

    The object to unpack.

    View Source

    UnPackAll()

    Removes all the objects from the Box container.

    Declaration
    [Obsolete("This has been deprecated in API12")]
    public void UnPackAll()

    Implements

    IAccessibleObject

    Extension Methods

    RotaryEventExtensions.Activate(EvasObject)
    RotaryEventExtensions.AddRotaryEventHandler(EvasObject, RotaryEventHandler)
    RotaryEventExtensions.Deactivate(EvasObject)
    RotaryEventExtensions.RemoveRotaryEventHandler(EvasObject, RotaryEventHandler)
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX