Show / Hide Table of Contents

    Class Button

    Definition

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

    The Button is a widget that works as a clickable input element to trigger events.

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

    Constructors

    View Source

    Button(EvasObject)

    Creates and initializes a new instance of the Button class.

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

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

    API Level: preview

    Properties

    View Source

    AutoRepeat

    Sets or gets the autorepeat feature of a given Bbutton.

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

    Autorepeat feature means the autorepeat event is generated when the button is kept pressed. When set to false, no autorepeat is performed and the buttons will trigger the Clicked event when they are clicked. When set to true, keeping a button pressed continuously will trigger the Repeated event until the button is released. The time it takes until it starts triggering, repeated is given by AutoRepeatInitialTime, and the time between each new emission is given by AutoRepeatGapTimeout.

    API Level: preview
    View Source

    AutoRepeatGapTimeout

    Sets or gets the interval between each generated Repeat event.

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

    AutoRepeatInitialTime

    Sets or gets the initial timeout before the Repeat event is generated.

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

    BackgroundColor

    Sets or gets the BackgroundColor of a given button in the normal and pressed status.

    Declaration
    public override Color BackgroundColor { set; }
    Property Value
    Type Description
    Color
    Overrides
    Layout.BackgroundColor
    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

    DeleteColorClass(String)

    DeleteColorClass is obsolete, please use EdjeObject.DeleteColorClass(string)

    Deletes the object Color class.

    Declaration
    [Obsolete("DeleteColorClass is obsolete, please use EdjeObject.DeleteColorClass(string)")]
    public void DeleteColorClass(string part)
    Parameters
    Type Name Description
    String part

    The Color class to be deleted.

    API Level: preview

    Events

    View Source

    Clicked

    Clicked will be triggered when the button is clicked.

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

    Pressed

    Pressed will be triggered when the button is pressed.

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

    Released

    Released will be triggered when the button is released after being pressed.

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

    Repeated

    Repeated will be triggered when the button is pressed without releasing it.

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