Show / Hide Table of Contents

    Class GenGrid

    Definition

    Namespace:
    ElmSharp
    Assembly:
    ElmSharp.dll
    API Level:
    preview

    It inherits Layout. The GenGrid is a widget that aims to position objects in a grid layout, while actually creating and rendering only the visible ones. It has two directions in which a given GenGrid widget expands while placing its items, horizontal and vertical. The gengrid items are represented through the GenItemClass definition field details.

    public class GenGrid : Layout, IAccessibleObject
    Inheritance
    Object
    EvasObject
    AccessibleObject
    Widget
    Container
    Layout
    GenGrid
    Implements
    IAccessibleObject

    Constructors

    View Source

    GenGrid(EvasObject)

    Creates and initializes a new instance of the GenGrid class.

    Declaration
    public GenGrid(EvasObject parent)
    Parameters
    Type Name Description
    EvasObject parent

    The parent is a given container which will be attached by GenGrid as a child. It's the EvasObject type.

    API Level: preview

    Properties

    View Source

    FillItems

    Gets or sets the manner in which the items grid is filled within a given GenGrid widget. It is filled if true, otherwise not filled if false.

    Declaration
    public bool FillItems { get; set; }
    Property Value
    Type Description
    Boolean
    API Level: preview
    View Source

    FirstItem

    Gets the first item in a given GenGrid widget.

    Declaration
    public GenGridItem FirstItem { get; }
    Property Value
    Type Description
    GenGridItem
    API Level: preview
    View Source

    HorizontalScrollBarVisiblePolicy

    Sets or gets the value of HorizontalScrollBarVisiblePolicy.

    Declaration
    public ScrollBarVisiblePolicy HorizontalScrollBarVisiblePolicy { get; set; }
    Property Value
    Type Description
    ScrollBarVisiblePolicy
    Remarks

    ScrollBarVisiblePolicy.Auto means the horizontal scrollbar is made visible if it is needed, and otherwise kept hidden. ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.

    API Level: preview
    View Source

    IsHighlight

    Gets or sets whether the gengrid items should be highlighted when an item is selected.

    Declaration
    public bool IsHighlight { get; set; }
    Property Value
    Type Description
    Boolean
    API Level: preview
    View Source

    IsHorizontal

    Gets or sets the direction for which a given GenGrid widget expands while placing its items.

    Declaration
    public bool IsHorizontal { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    If true, items are placed in columns from top to bottom and when the space for a column is filled, another one is started on the right, thus expanding the grid horizontally. If false, items are placed in rows from left to right, and when the space for a row is filled, another one is started below, thus expanding the grid vertically.

    API Level: preview
    View Source

    ItemAlignmentX

    Gets or sets the item's grid alignment along X-axis within a given GenGrid widget. Accepted values are in the 0.0 to 1.0 range, with the special value -1.0 used to specify "justify" or "fill" by some users. By default, value is 0.0, meaning that the gengrid has its items grid placed exactly in the left along X-axis.

    Declaration
    public double ItemAlignmentX { get; set; }
    Property Value
    Type Description
    Double
    API Level: preview
    View Source

    ItemAlignmentY

    Gets or sets the item's grid alignment on Y-axis within a given GenGrid widget. Accepted values are in the 0.0 to 1.0 range, with the special value -1.0 used to specify "justify" or "fill" by some users. By default, value is 0.0, meaning that the gengrid has its items grid placed exactly in the top along Y-axis.

    Declaration
    public double ItemAlignmentY { get; set; }
    Property Value
    Type Description
    Double
    API Level: preview
    View Source

    ItemCount

    Gets the items count in a given GenGrid widget.

    Declaration
    public uint ItemCount { get; }
    Property Value
    Type Description
    UInt32
    API Level: preview
    View Source

    ItemHeight

    Gets or sets the height for the items of a given GenGrid widget.

    Declaration
    public int ItemHeight { get; set; }
    Property Value
    Type Description
    Int32
    Remarks

    A gengrid, after creation, still has no information on the size to give to each of its cells. The default width and height just are one finger wide. Use this property to force a custom height for your items, making them as big as you wish.

    API Level: preview
    View Source

    ItemWidth

    Gets or sets the width for the items of a given GenGrid widget.

    Declaration
    public int ItemWidth { get; set; }
    Property Value
    Type Description
    Int32
    Remarks

    A gengrid, after creation, still has no information on the size to give to each of its cells. The default width and height just are one finger wide. Use this property to force a custom width for your items, making them as big as you wish.

    API Level: preview
    View Source

    LastItem

    Gets the last item in a given GenGrid widget.

    Declaration
    public GenGridItem LastItem { get; }
    Property Value
    Type Description
    GenGridItem
    API Level: preview
    View Source

    MultipleSelection

    Gets or sets whether multi-selection is enabled or disabled for a given GenGrid widget.

    Declaration
    public bool MultipleSelection { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Multi-selection is the ability to have more than one item selected, on a given gengrid, simultaneously. When it is enabled, a sequence of clicks on different items makes them all selected, progressively. A click on an already selected item unselects it. If interacting via the keyboard, multi-selection is enabled while holding the "Shift" key. By default, multi-selection is disabled.

    API Level: preview
    View Source

    ReorderMode

    Gets or sets whether a given GenGrid widget is able to or not able to have items reordered.

    Declaration
    public bool ReorderMode { get; set; }
    Property Value
    Type Description
    Boolean
    API Level: preview
    View Source

    SelectedItem

    Gets the selected item in a given GenGrid widget.

    Declaration
    public GenGridItem SelectedItem { get; }
    Property Value
    Type Description
    GenGridItem
    API Level: preview
    View Source

    SelectionMode

    Gets or sets the gengrid select mode by GenItemSelectionMode.

    Declaration
    public GenItemSelectionMode SelectionMode { get; set; }
    Property Value
    Type Description
    GenItemSelectionMode
    API Level: preview
    View Source

    VerticalScrollBarVisiblePolicy

    Sets or gets the value of VerticalScrollBarVisiblePolicy.

    Declaration
    public ScrollBarVisiblePolicy VerticalScrollBarVisiblePolicy { get; set; }
    Property Value
    Type Description
    ScrollBarVisiblePolicy
    Remarks

    ScrollBarVisiblePolicy.Auto means the vertical scrollbar is made visible if it is needed, and otherwise kept hidden. ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.

    API Level: preview

    Methods

    View Source

    Append(GenItemClass, Object)

    Appends a new item to a given GenGrid widget. This adds an item to the end of the gengrid.

    Declaration
    public GenGridItem Append(GenItemClass itemClass, object data)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    Object data

    The item data.

    Returns
    Type Description
    GenGridItem

    Return a gengrid item that contains the data and itemClass.

    See Also
    GenItemClass
    GenGridItem
    API Level: preview
    View Source

    Clear()

    Removes all the items from a given GenGrid widget. This removes (and deletes) all the items in the object, making it empty.

    Declaration
    public void Clear()
    Remarks

    Delete() to delete just one item.

    API Level: preview
    View Source

    CreateHandle(EvasObject)

    Creates a widget handle.

    Declaration
    protected override IntPtr CreateHandle(EvasObject parent)
    Parameters
    Type Name Description
    EvasObject parent

    Parent EvasObject.

    Returns
    Type Description
    IntPtr

    Handle IntPtr.

    Overrides
    Layout.CreateHandle(EvasObject)
    API Level: preview
    View Source

    GetItemByPosition(Int32, Int32, out Int32, out Int32)

    Gets the item that is at the X, Y canvas coordinates.

    Declaration
    public GenGridItem GetItemByPosition(int x, int y, out int portionX, out int portionY)
    Parameters
    Type Name Description
    Int32 x

    The input X coordinate.

    Int32 y

    The input Y coordinate.

    Int32 portionX

    The position relative to the item returned here. -1, 0, or 1, depending if the coordinate is on the left portion of that item(-1), on the middle section(0), or on the right part(1).

    Int32 portionY

    The position relative to the item returned here. -1, 0, or 1, depending if the coordinate is on the upper portion of that item (-1), on the middle section (0), or on the lower part (1).

    Returns
    Type Description
    GenGridItem
    API Level: preview
    View Source

    InsertAfter(GenItemClass, Object, GenGridItem)

    Inserts an item after another in a GenGrid widget. This inserts an item after another in the gengrid.

    Declaration
    public GenGridItem InsertAfter(GenItemClass itemClass, object data, GenGridItem after)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    Object data

    The item data.

    GenGridItem after

    The item after which to place this new one.

    Returns
    Type Description
    GenGridItem

    Return a gengrid item that contains the data and itemClass.

    See Also
    GenItemClass
    GenGridItem
    API Level: preview
    View Source

    InsertBefore(GenItemClass, Object, GenGridItem)

    Inserts an item before another in a GenGrid widget. This inserts an item before another in the gengrid.

    Declaration
    public GenGridItem InsertBefore(GenItemClass itemClass, object data, GenGridItem before)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    Object data

    The item data.

    GenGridItem before

    The item before which to place this new one.

    Returns
    Type Description
    GenGridItem

    Return a gengrid item that contains the data and itemClass.

    See Also
    GenItemClass
    GenGridItem
    API Level: preview
    View Source

    InsertSorted(GenItemClass, Object, Comparison<Object>)

    Inserts an item in a GenGrid widget using a user-defined sort function.

    Declaration
    public GenGridItem InsertSorted(GenItemClass itemClass, object data, Comparison<object> comparison)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    Object data

    The item data.

    Comparison<Object> comparison

    User defined comparison function that defines the sort order based on the gengrid item and its data.

    Returns
    Type Description
    GenGridItem

    Return a gengrid item that contains the data and itemClass.

    API Level: preview
    View Source

    Prepend(GenItemClass, Object)

    Prepends a new item to a given GenGrid widget. This adds an item to the beginning of the gengrid.

    Declaration
    public GenGridItem Prepend(GenItemClass itemClass, object data)
    Parameters
    Type Name Description
    GenItemClass itemClass

    The itemClass defines how to display the data.

    Object data

    The item data.

    Returns
    Type Description
    GenGridItem

    Return a gengrid item that contains the data and itemClass.

    See Also
    GenItemClass
    GenGridItem
    API Level: preview
    View Source

    ScrollTo(GenGridItem, ScrollToPosition, Boolean)

    Shows a given item to the visible area of a gengrid.

    Declaration
    public void ScrollTo(GenGridItem item, ScrollToPosition position, bool animated)
    Parameters
    Type Name Description
    GenGridItem item

    The gengrid item to display.

    ScrollToPosition position

    The position of the item in the viewport.

    Boolean animated

    The type of how to show the item.

    Remarks

    If animated is true, the gengrid shows the item by scrolling if it's not fully visible. If animated is false, the gengrid shows the item by jumping if it's not fully visible.

    See Also
    ScrollToPosition
    API Level: preview
    View Source

    UpdateRealizedItems()

    Updates the contents of all the realized items. This updates all realized items by calling all the GenItemClass again to get the content, text, and states. Use this when the original item data has changed and the changes are desired to reflect.

    Declaration
    public void UpdateRealizedItems()
    Remarks

    Update() to update just one item.

    API Level: preview

    Events

    View Source

    Changed

    Changed is raised when an item is added, removed, resized or moved and when the gengrid is resized or gets "horizontal" property changes.

    Declaration
    public event EventHandler Changed
    Event Type
    Type Description
    EventHandler
    API Level: preview
    View Source

    ItemActivated

    ItemActivated is raised when a new gengrid item is double-clicked or pressed (enter|return|spacebar).

    Declaration
    public event EventHandler<GenGridItemEventArgs> ItemActivated
    Event Type
    Type Description
    EventHandler<GenGridItemEventArgs>
    API Level: preview
    View Source

    ItemDoubleClicked

    ItemDoubleClicked is raised when a new gengrid item is double-clicked.

    Declaration
    public event EventHandler<GenGridItemEventArgs> ItemDoubleClicked
    Event Type
    Type Description
    EventHandler<GenGridItemEventArgs>
    API Level: preview
    View Source

    ItemFocused

    ItemFocussed is raised when a gengrid item has received focus.

    Declaration
    public event EventHandler<GenGridItemEventArgs> ItemFocused
    Event Type
    Type Description
    EventHandler<GenGridItemEventArgs>
    API Level: preview
    View Source

    ItemLongPressed

    ItemLongPressed is raised when a gengrid item is pressed for a certain amount of time. By default it's 1 second.

    Declaration
    public event EventHandler<GenGridItemEventArgs> ItemLongPressed
    Event Type
    Type Description
    EventHandler<GenGridItemEventArgs>
    API Level: preview
    View Source

    ItemPressed

    ItemPressed is raised when a new gengrid item is pressed.

    Declaration
    public event EventHandler<GenGridItemEventArgs> ItemPressed
    Event Type
    Type Description
    EventHandler<GenGridItemEventArgs>
    API Level: preview
    View Source

    ItemRealized

    ItemRealized is raised when a gengrid item is implemented through GenItemClass.

    Declaration
    public event EventHandler<GenGridItemEventArgs> ItemRealized
    Event Type
    Type Description
    EventHandler<GenGridItemEventArgs>
    API Level: preview
    View Source

    ItemReleased

    ItemReleased is raised when a new gengrid item is released.

    Declaration
    public event EventHandler<GenGridItemEventArgs> ItemReleased
    Event Type
    Type Description
    EventHandler<GenGridItemEventArgs>
    API Level: preview
    View Source

    ItemSelected

    ItemSelected is raised when a new GenGrid item is selected.

    Declaration
    public event EventHandler<GenGridItemEventArgs> ItemSelected
    Event Type
    Type Description
    EventHandler<GenGridItemEventArgs>
    API Level: preview
    View Source

    ItemUnfocused

    ItemUnfocussed is raised when a gengrid item has lost focus.

    Declaration
    public event EventHandler<GenGridItemEventArgs> ItemUnfocused
    Event Type
    Type Description
    EventHandler<GenGridItemEventArgs>
    API Level: preview
    View Source

    ItemUnrealized

    ItemUnrealized is raised when the gengrid item is deleted.

    Declaration
    public event EventHandler<GenGridItemEventArgs> ItemUnrealized
    Event Type
    Type Description
    EventHandler<GenGridItemEventArgs>
    API Level: preview
    View Source

    ItemUnselected

    ItemUnselected is raised when the gengrid item is unselected.

    Declaration
    public event EventHandler<GenGridItemEventArgs> ItemUnselected
    Event Type
    Type Description
    EventHandler<GenGridItemEventArgs>
    API Level: preview

    Implements

    IAccessibleObject

    Extension Methods

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