Show / Hide Table of Contents

    Class Slider

    Definition

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

    The Slider is a widget that adds a draggable slider widget for selecting the value of something within a range.

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

    Constructors

    View Source

    Slider(EvasObject)

    Creates and initializes a new instance of the Slider class.

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

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

    API Level: preview

    Properties

    View Source

    IndicatorFormat

    Sets or gets the format string for the indicator label.

    Declaration
    public string IndicatorFormat { get; set; }
    Property Value
    Type Description
    String
    Remarks

    The slider may display its value somewhere other than the unit label, for example, above the slider knob that is dragged around. This function sets the format string used for this. If null, the indicator label won't be visible. If not, it sets the format string for the label text. For the label text floating point value is provided, so the label text can display up to 1 floating point value. Note that this is optional. Use a format string such as "%1.2f meters" for example, and it displays values like: "3.14 meters" for a value equal to 3.14159. By default, the indicator label is disabled.

    API Level: preview
    View Source

    IndicatorVisibleMode

    Sets or gets the visible mode of the slider indicator.

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

    IsHorizontal

    Sets or gets the orientation of a given slider widget.

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

    The orientation may be vertical or horizontal. By default, it's displayed horizontally.

    API Level: preview
    View Source

    IsIndicatorFocusable

    Sets or gets whether to show the indicator of a slider on focus.

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

    IsIndicatorVisible

    Sets or gets whether to enlarge the slider indicator (augmented knob).

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

    By default, the indicator is bigger when dragged by the user. It won't display the values set with IndicatorFormat if you disable the indicator.

    API Level: preview
    View Source

    IsInverted

    Gets or sets whether a given slider widget's displaying values are inverted.

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

    A slider may be inverted, in which case it gets its values inverted, with high values being on the left or top, and low values on the right or bottom, as opposed to normally have the low values on the former and high values on the latter, respectively, for the horizontal and vertical modes.

    API Level: preview
    View Source

    Maximum

    Sets or gets the maximum values for the slider.

    Declaration
    public double Maximum { get; set; }
    Property Value
    Type Description
    Double
    Remarks

    This defines the allowed maximum values to be selected by the user. If the actual value is bigger then max, it is updated to max. Actual value can be obtained with value. By default, minimum is equal to 0.0 and maximum is equal to 1.0. Maximum must be greater than minimum, otherwise the behavior is undefined.

    API Level: preview
    View Source

    Minimum

    Sets or gets the minimum values for the slider.

    Declaration
    public double Minimum { get; set; }
    Property Value
    Type Description
    Double
    Remarks

    This defines the allowed minimum values to be selected by the user. If the actual value is less than min, it is updated to min. Actual value can be obtained with value. By default, the minimum is equal to 0.0.

    API Level: preview
    View Source

    SpanSize

    Sets or gets the (exact) length of the bar region of a given Slider widget.

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

    This sets the minimum width (when in the horizontal mode) or height (when in the vertical mode) of the actual bar area of the slider object. This in turn affects the object's minimum size. Use this when you're not setting other size hints expanding on the given direction (like weight and alignment hints), and you would like it to have a specific size.

    API Level: preview
    View Source

    Step

    Sets or gets the step by which the slider indicator moves.

    Declaration
    public double Step { get; set; }
    Property Value
    Type Description
    Double
    Remarks

    This value is used when the draggable object is moved automatically i.e., in case of a key event when up/down/left/right key is pressed or in case accessibility is set and the flick event is used to increase or decrease the slider values. By default, the step value is equal to 0.05.

    API Level: preview
    View Source

    Value

    Gets or sets the value displayed by the slider.

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

    Value will be presented on the unit label following format specified with UnitFormat and on indicator with IndicatorFormat. The value must be between minimum and maximum values.

    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

    Events

    View Source

    DelayedValueChanged

    DelayedValueChanged will be triggered when a short time after the value is changed by the user. This will be called only when the user stops dragging for a very short period or when they release their finger/mouse, so it avoids possibly expensive reactions to the value change.

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

    DragStarted

    DragStarted will be triggered when dragging the Slider indicator around has started.

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

    DragStopped

    DragStopped will be triggered when dragging the Slider indicator around has stopped.

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

    ValueChanged

    ValueChanged will be triggered when the Slider value is changed by the user.

    Declaration
    public event EventHandler ValueChanged
    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