Show / Hide Table of Contents

    Class Scroller

    Definition

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

    The Scroller is a container that holds and clips a single object and allows you to scroll across it.

    public class Scroller : Layout, IAccessibleObject
    Inheritance
    Object
    EvasObject
    AccessibleObject
    Widget
    Container
    Layout
    Scroller
    Derived
    CircleScroller
    CircleScroller
    Implements
    IAccessibleObject

    Constructors

    View Source

    Scroller()

    Creates and initializes a new instance of the Scroller class.

    Declaration
    public Scroller()
    API Level: preview
    View Source

    Scroller(EvasObject)

    Creates and initializes a new instance of the Scroller class.

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

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

    API Level: preview

    Properties

    View Source

    ChildHeight

    Gets the height of the content object of the scroller.

    Declaration
    public int ChildHeight { get; }
    Property Value
    Type Description
    Int32
    API Level: preview
    View Source

    ChildWidth

    Gets the width of the content object of the scroller.

    Declaration
    public int ChildWidth { get; }
    Property Value
    Type Description
    Int32
    API Level: preview
    View Source

    ContentPropagateEvents

    Gets or sets the event propagation for a scroller. This enables or disables event propagation from the scroller content to the scroller and its parent. By default, event propagation is enabled.

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

    CurrentRegion

    Gets the current region in the content object that is visible through the scroller.

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

    HorizontalBounce

    Sets or gets the horizontal bounce behaviour. When scrolling, the scroller may "bounce" when reaching an edge of the content object. This is a visual way to indicate the end has been reached. This is enabled by default for both axis. This API will set if it is enabled for the given axis with the boolean parameters for each axis.

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

    HorizontalGravity

    Sets the scrolling gravity values for a scroller. The gravity defines how the scroller will adjust its view when the size of the scroller contents increase. The scroller will adjust the view to glue itself as follows: x=0.0, for staying where it is relative to the left edge of the content, x=1.0, for staying where it is relative to the rigth edge of the content, y=0.0, for staying where it is relative to the top edge of the content, y=1.0, for staying where it is relative to the bottom edge of the content. Default values for x and y are 0.0.

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

    HorizontalLoop

    Sets an infinite loop_ for a scroller. This function sets the infinite loop horizontally. If the content is set, it will be shown repeatedly.

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

    HorizontalPageIndex

    Sets or gets the scroll current page number.

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

    Current page means the page which meets the left of the viewport. If there are two or more pages in the viewport, it returns the number of the page which meets the left of the viewport. The page number starts from 0. 0 is the first page.

    API Level: preview
    View Source

    HorizontalPageScrollLimit

    Sets or gets the maximum limit of the movable page at horizontal direction.

    Declaration
    public int HorizontalPageScrollLimit { get; set; }
    Property Value
    Type Description
    Int32
    API Level: preview
    View Source

    HorizontalRelativePageSize

    Gets or sets a given scroller widget's scrolling page size, relative to its viewport size.

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

    HorizontalScrollBarVisiblePolicy

    Sets or gets the value of HorizontalScrollBarVisiblePolicy.

    Declaration
    public virtual 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

    HorizontalSnap

    Gets or sets the page snapping behavior of a scroller.

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

    When scrolling, if a scroller is paged (see HorizontalRelativePageSize), the scroller may snap to pages when being scrolled, i.e., even if it had momentum to scroll further, it will stop at the next page boundaries. This is disabled, by default, for both axis. This function will set if it that is enabled or not, for each axis.

    API Level: preview
    View Source

    HorizontalStepSize

    Gets or sets the step size to move scroller by key event.

    Declaration
    public int HorizontalStepSize { get; set; }
    Property Value
    Type Description
    Int32
    API Level: preview
    View Source

    LastHorizontalPageNumber

    Gets the scroll last page number. The page number starts from 0. 0 is the first page. This returns the last page number among the pages.

    Declaration
    public int LastHorizontalPageNumber { get; }
    Property Value
    Type Description
    Int32
    API Level: preview
    View Source

    LastVerticalPageNumber

    Gets the scroll last page number. The page number starts from 0. 0 is the first page. This returns the last page number among the pages.

    Declaration
    public int LastVerticalPageNumber { get; }
    Property Value
    Type Description
    Int32
    API Level: preview
    View Source

    PageHeight

    Gets or sets the page size to an absolute fixed value, with 0 turning it off for that axis.

    Declaration
    public int PageHeight { get; set; }
    Property Value
    Type Description
    Int32
    API Level: preview
    View Source

    PageWidth

    Gets or sets the page size to an absolute fixed value, with 0 turning it off for that axis.

    Declaration
    public int PageWidth { get; set; }
    Property Value
    Type Description
    Int32
    API Level: preview
    View Source

    ScrollBlock

    Sets or gets the value of ScrollBlock.

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

    This function will block scrolling movement in a given direction. One can disable movements in the X-axis, the Y-axis, or both. The default value is ScrollBlock.None, where movements are allowed in both directions.

    API Level: preview
    View Source

    SingleDirection

    Gets or sets the type of single direction scroll.

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

    VerticalBounce

    Sets or gets the vertical bounce behaviour. When scrolling, the scroller may "bounce" when reaching an edge of the content object. This is a visual way to indicate the end has been reached. This is enabled by default for both axis. This API will set if it is enabled for the given axis with the boolean parameters for each axis.

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

    VerticalGravity

    Sets the scrolling gravity values for a scroller. The gravity defines how the scroller will adjust its view when the size of the scroller contents increase. The scroller will adjust the view to glue itself as follows: x=0.0, for staying where it is relative to the left edge of the content, x=1.0, for staying where it is relative to the rigth edge of the content, y=0.0, for staying where it is relative to the top edge of the content, y=1.0, for staying where it is relative to the bottom edge of the content. Default values for x and y are 0.0.

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

    VerticalLoop

    Sets an infinite loop_ for a scroller. This function sets the infinite loop vertically. If the content is set, it will be shown repeatedly.

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

    VerticalPageIndex

    Sets or gets the scroll current page number.

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

    Current page means the page which meets the top of the viewport. If there are two or more pages in the viewport, it returns the number of the page which meets the top of the viewport. The page number starts from 0. 0 is the first page.

    API Level: preview
    View Source

    VerticalPageScrollLimit

    Sets or gets the maximum limit of the movable page at vertical direction.

    Declaration
    public int VerticalPageScrollLimit { get; set; }
    Property Value
    Type Description
    Int32
    API Level: preview
    View Source

    VerticalRelativePageSize

    Gets or sets a given scroller widget's scrolling page size, relative to its viewport size.

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

    VerticalScrollBarVisiblePolicy

    Sets or gets the value of VerticalScrollBarVisiblePolicy.

    Declaration
    public virtual 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
    View Source

    VerticalSnap

    Gets or sets the page snapping behavior of a scroller.

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

    When scrolling, if a scroller is paged (see VerticalRelativePageSize), the scroller may snap to pages when being scrolled, i.e., even if it had momentum to scroll further, it will stop at the next page boundaries. This is disabled, by default, for both axis. This function will set if it that is enabled or not, for each axis.

    API Level: preview
    View Source

    VerticalStepSize

    Gets or sets the step size to move scroller by key event.

    Declaration
    public int VerticalStepSize { get; set; }
    Property Value
    Type Description
    Int32
    API Level: preview
    View Source

    WheelDisabled

    Gets or sets a value whether mouse wheel is enabled or not over the scroller.

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

    Methods

    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

    MinimumLimit(Boolean, Boolean)

    Sets the scroller minimum size limited to the minimum size of the content. By default, the scroller will be as small as its design allows, irrespective of its content. This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction.

    Declaration
    public void MinimumLimit(bool horizontal, bool vertical)
    Parameters
    Type Name Description
    Boolean horizontal

    Enable limiting minimum size horizontally.

    Boolean vertical

    Enable limiting minimum size vertically.

    API Level: preview
    View Source

    OnRealized()

    The callback of the Realized event.

    Declaration
    protected override void OnRealized()
    Overrides
    Layout.OnRealized()
    API Level: preview
    View Source

    ScrollTo(Rect, Boolean)

    Shows a specific virtual region within the scroller content object.

    Declaration
    public void ScrollTo(Rect region, bool animated)
    Parameters
    Type Name Description
    Rect region

    Rect struct of region.

    Boolean animated

    True means allows the scroller to "smoothly slide" to this location.

    Remarks

    This ensures that all (or part, if it does not fit) of the designated region in the virtual content object ((0, 0) starting at the top-left of the virtual content object) is shown within the scroller. If set "animated" to true, it will allows the scroller to "smoothly slide" to this location (if configuration in general calls for transitions). It may not jump immediately to the new location and may take a while and show other content along the way.

    API Level: preview
    View Source

    ScrollTo(Int32, Int32, Boolean)

    Shows a specific virtual region within the scroller content object by the page number. (0, 0) of the indicated page is located at the top-left corner of the viewport.

    Declaration
    public void ScrollTo(int horizontalPageIndex, int verticalPageIndex, bool animated)
    Parameters
    Type Name Description
    Int32 horizontalPageIndex

    The horizontal page number.

    Int32 verticalPageIndex

    The vertical page number.

    Boolean animated

    True means slider with animation.

    API Level: preview
    View Source

    SetPageSize(Double, Double)

    Sets the scroll page size relative to the viewport size.

    Declaration
    public void SetPageSize(double width, double height)
    Parameters
    Type Name Description
    Double width

    The horizontal page relative size.

    Double height

    The vertical page relative size.

    Remarks

    The scroller is capable of limiting scrolling by the user to "pages". That is to jump by and only show a "whole page" at a time as if the continuous area of the scroller content is split into page sized pieces. This sets the size of a page relative to the viewport of the scroller. 1.0 is "1 viewport" which is the size (horizontally or vertically). 0.0 turns it off in that axis. This is mutually exclusive with the page size (see elm_scroller_page_size_set() for more information). Likewise 0.5 is "half a viewport". Usable values are normally between 0.0 and 1.0 including 1.0. If you only want 1 axis to be page "limited", use 0.0 for the other axis.

    API Level: preview
    View Source

    SetPageSize(Int32, Int32)

    Sets the page size to an absolute fixed value, with 0 turning it off for that axis.

    Declaration
    public void SetPageSize(int width, int height)
    Parameters
    Type Name Description
    Int32 width

    The horizontal page size.

    Int32 height

    The vertical page size.

    API Level: preview

    Events

    View Source

    DragStart

    DragStart will be triggered when dragging the contents around has started.

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

    DragStop

    DragStop will be triggered when dragging the contents around has stopped.

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

    PageScrolled

    PageScrolled will be triggered when the visible page has changed.

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

    ScrollAnimationStarted

    ScrollAnimationStarted will be triggered when the content animation has been started.

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

    ScrollAnimationStopped

    ScrollAnimationStopped will be triggered when the content animation has been stopped.

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

    Scrolled

    Scrolled will be triggered when the content has been scrolled.

    Declaration
    public event EventHandler Scrolled
    Event Type
    Type Description
    EventHandler
    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