Show / Hide Table of Contents

    Class Widget

    Definition

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

    The Widget is an abstract class and the parent of other widgets. Inherits from EvasObject.

    public abstract class Widget : AccessibleObject, IAccessibleObject
    Inheritance
    Object
    EvasObject
    AccessibleObject
    Widget
    Derived
    Conformant
    Conformant
    Container
    Container
    GestureLayer
    GestureLayer
    Image
    Image
    Naviframe
    Naviframe
    Toolbar
    Toolbar
    CircleProgressBar
    CircleProgressBar
    CircleSlider
    CircleSlider
    Window
    Window
    Implements
    IAccessibleObject

    Constructors

    View Source

    Widget()

    Creates and initializes a new instance of the Widget class.

    Declaration
    protected Widget()
    API Level: preview
    View Source

    Widget(EvasObject)

    Creates and initializes a new instance of the Widget class.

    Declaration
    protected Widget(EvasObject parent)
    Parameters
    Type Name Description
    EvasObject parent

    The parent of the new Widget instance.

    API Level: preview

    Properties

    View Source

    AllowTreeFocus

    Sets or gets whether a widget and its children are focusable or not.

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

    BackgroundColor

    Sets or gets the background color of the widget.

    Declaration
    public virtual Color BackgroundColor { get; set; }
    Property Value
    Type Description
    Color
    Remarks

    It could be overridden by special child class.

    API Level: preview
    View Source

    IsAutoMirroredMode

    Sets or gets the widget's mirrored mode setting. When widget is set to automatic mode(true), it follows the system mirrored mode.

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

    IsEnabled

    Sets or gets the state of the widget, which might be enabled or disabled.

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

    IsFocusAllowed

    Gets whether a widget is focusable or not.

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

    Widgets which are meant to be interacted with by input events, are created able to be focused by default.

    API Level: preview
    View Source

    IsFocused

    Gets whether this widget is focused.

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

    IsMirroredMode

    Sets or gets the widget's mirrored mode.

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

    Opacity

    Sets or gets the opacity of the widget.

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

    It could be overridden by special child class.

    API Level: preview
    View Source

    Style

    Sets or gets the style of the widget.

    Declaration
    public string Style { get; set; }
    Property Value
    Type Description
    String
    API Level: preview
    View Source

    Text

    Sets or gets the text of the widget.

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

    It could be overridden by special child class.

    API Level: preview

    Methods

    View Source

    AllowFocus(Boolean)

    Sets the ability for a widget to be focused.

    Declaration
    public void AllowFocus(bool isAllowFocus)
    Parameters
    Type Name Description
    Boolean isAllowFocus

    true if the object can be focused, false if not(and on errors).

    API Level: preview
    View Source

    FocusNext(FocusDirection)

    Gives focus to the next widget in the widget tree.

    Declaration
    public void FocusNext(FocusDirection direction)
    Parameters
    Type Name Description
    FocusDirection direction

    Direction to move the focus.

    API Level: preview
    View Source

    GetPartColor(String)

    Gets color of the particular part of the widget.

    Declaration
    public virtual Color GetPartColor(string part)
    Parameters
    Type Name Description
    String part

    The name of the particular part.

    Returns
    Type Description
    Color

    The color of the particular part.

    Remarks

    This method is a virtual method, it could be overridden by special child class.

    API Level: preview
    View Source

    GetPartOpacity(String)

    Gets opacity of the particular part of the widget.

    Declaration
    public int GetPartOpacity(string part)
    Parameters
    Type Name Description
    String part

    The name of the particular part.

    Returns
    Type Description
    Int32

    Opacity value of the particular part.

    API Level: preview
    View Source

    GetPartText(String)

    Gets text of a particular part of the widget.

    Declaration
    public virtual string GetPartText(string part)
    Parameters
    Type Name Description
    String part

    The name of the particular part.

    Returns
    Type Description
    String

    Text of the particular part of the widget.

    API Level: preview
    View Source

    OnRealized()

    The callback of the Realized event.

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

    SetContent(EvasObject)

    Sets content to the widget, and the preserve old content will be deleted.

    Declaration
    public void SetContent(EvasObject content)
    Parameters
    Type Name Description
    EvasObject content

    The content.

    See Also
    SetContent(EvasObject, Boolean)
    API Level: preview
    View Source

    SetContent(EvasObject, Boolean)

    Sets content to the widget.

    Declaration
    public void SetContent(EvasObject content, bool preserveOldContent)
    Parameters
    Type Name Description
    EvasObject content

    The content.

    Boolean preserveOldContent

    true, preserve old content will be unset and not be deleted. false, preserve old content will be deleted.

    See Also
    SetContent(EvasObject)
    API Level: preview
    View Source

    SetFocus(Boolean)

    Sets the widget to be focused or not.

    Declaration
    public void SetFocus(bool isFocus)
    Parameters
    Type Name Description
    Boolean isFocus

    Whether be focused.

    API Level: preview
    View Source

    SetNextFocusObject(EvasObject, FocusDirection)

    Sets the next widget with specific focus direction.

    Declaration
    public void SetNextFocusObject(EvasObject next, FocusDirection direction)
    Parameters
    Type Name Description
    EvasObject next

    Focus next widget.

    FocusDirection direction

    Focus direction.

    API Level: preview
    View Source

    SetPartColor(String, Color)

    Sets color of a particular part of the widget.

    Declaration
    public virtual void SetPartColor(string part, Color color)
    Parameters
    Type Name Description
    String part

    The name of the particular part.

    Color color

    The color to be set to the widget.

    Remarks

    This method is a virtual method, it could be overridden by special child class.

    API Level: preview
    View Source

    SetPartContent(String, EvasObject)

    Sets content to the particular part of the widget, and the preserve old content will be deleted.

    Declaration
    public virtual bool SetPartContent(string part, EvasObject content)
    Parameters
    Type Name Description
    String part

    The name of the particular part.

    EvasObject content

    The content.

    Returns
    Type Description
    Boolean
    See Also
    SetPartContent(String, EvasObject, Boolean)
    API Level: preview
    View Source

    SetPartContent(String, EvasObject, Boolean)

    Sets content to the particular part of the widget.

    Declaration
    public virtual bool SetPartContent(string part, EvasObject content, bool preserveOldContent)
    Parameters
    Type Name Description
    String part

    The name of the particular part.

    EvasObject content

    The content.

    Boolean preserveOldContent

    true, preserve old content will be unset and not be deleted. false, preserve old content will be deleted.

    Returns
    Type Description
    Boolean
    See Also
    SetPartContent(String, EvasObject)
    API Level: preview
    View Source

    SetPartOpacity(String, Int32)

    Sets opacity of the particular part of the widget.

    Declaration
    public void SetPartOpacity(string part, int opacity)
    Parameters
    Type Name Description
    String part

    The name of the particular part.

    Int32 opacity

    The opacity of the particular part.

    API Level: preview
    View Source

    SetPartText(String, String)

    Sets text to the particular part of the widget.

    Declaration
    public virtual bool SetPartText(string part, string text)
    Parameters
    Type Name Description
    String part

    The name of the particular part.

    String text

    The text.

    Returns
    Type Description
    Boolean
    API Level: preview
    View Source

    SignalEmit(String, String)

    Sends a signal to the edje object of the widget.

    Declaration
    public void SignalEmit(string emission, string source)
    Parameters
    Type Name Description
    String emission

    The signal's name.

    String source

    The signal's source.

    API Level: preview
    View Source

    UpdatePartContents(EvasObject, String)

    Updates the part contents.

    Declaration
    protected void UpdatePartContents(EvasObject content, string part = "__default__")
    Parameters
    Type Name Description
    EvasObject content

    The content which is put into the part.

    String part

    The updated part.

    API Level: preview

    Events

    View Source

    Focused

    Focused will be triggered when the widget is focused.

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

    Unfocused

    Unfocused will be triggered when the widget is unfocused.

    Declaration
    public event EventHandler Unfocused
    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-2022 Samsung
    Generated by DocFX