Class UIGadget

    Definition

    Namespace:
    Tizen.Applications
    Assembly:
    Tizen.Applications.UIGadget.dll

    Represents an UIGadget controlled lifecycle.

    public abstract class UIGadget : IUIGadget
    Inheritance
    object
    UIGadget
    Implements
    IUIGadget
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    Constructors

    View Source

    UIGadget(UIGadgetType, ILoaderFactory, bool)

    Initializes the UIGadget with DataLoader factory.

    Declaration
    public UIGadget(UIGadgetType type, ILoaderFactory loaderFactory, bool autoClose = true)
    Parameters
    Type Name Description
    UIGadgetType type

    The type of the UIGadget.

    ILoaderFactory loaderFactory

    The factory that can create DataLoader object

    bool autoClose

    Whether to automatically close the loader after execution

    Remarks

    This constructor initializes a new instance of the UIGadget class based on the specified type with DataLoader. It is important to provide the correct type argument in order to ensure proper functionality and compatibility with other components.

    View Source

    UIGadget(UIGadgetType)

    Initializes the UIGadget.

    Declaration
    public UIGadget(UIGadgetType type)
    Parameters
    Type Name Description
    UIGadgetType type

    The type of the UIGadget.

    Remarks

    This constructor initializes a new instance of the UIGadget class based on the specified type. It is important to provide the correct type argument in order to ensure proper functionality and compatibility with other components.

    Properties

    View Source

    ClassName

    The class name.

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

    This property is set before the OnCreate() is called, after the instance has been created. It provides access to the name of the class that was used to create the current instance.

    View Source

    DataLoader

    The DataLoader.

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

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    MainView

    The main view of the UIGadget.

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

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    State

    The current lifecycle state of the UIGadget.

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

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    Type

    The type of the UIGadget.

    Declaration
    public UIGadgetType Type { get; }
    Property Value
    Type Description
    UIGadgetType
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    UIGadgetInfo

    The class representing information of the current UIGadget.

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

    This property is set before the OnCreate() is called, after the instance has been created. It provides details about the current UIGadget such as its ID, name, version, and other relevant information. By accessing this property, developers can retrieve the necessary information about the UIGadget they are working on.

    View Source

    UIGadgetResourceManager

    The resource manager.

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

    This property is set before the OnCreate() is called, after the instance has been created. It provides access to various resources such as images, sounds, and fonts that can be used in your application. By utilizing the resource manager, you can easily manage and retrieve these resources without having to manually handle their loading and unloading. Additionally, the resource manager ensures efficient memory management by automatically handling the caching and recycling of resources.

    Methods

    View Source

    Finish()

    Finishes the UIGadget.

    Declaration
    public void Finish()
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    OnAppControlReceived(AppControlReceivedEventArgs)

    Overrides this method if want to handle behavior when the UIGadget receives the appcontrol message.

    Declaration
    protected virtual void OnAppControlReceived(AppControlReceivedEventArgs e)
    Parameters
    Type Name Description
    AppControlReceivedEventArgs e

    The appcontrol received event argument containing details about the received message.

    Remarks

    This method provides a way to customize the response when the UIGadget receives an appcontrol message. By overriding this method in your derived class, you can define specific actions based on the incoming arguments.

    View Source

    OnCreate()

    Override this method to define the behavior when the UIGadget is created. Calling 'base.OnCreate()' is necessary in order to emit the 'UIGadgetLifecycleChanged' event with the 'UIGadgetLifecycleState.Created' state.

    Declaration
    protected virtual object OnCreate()
    Returns
    Type Description
    object

    The main view object.

    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    OnDestroy()

    Override this method to handle the behavior when the UIGadget is destroyed. If 'base.OnDestroy()' is not called, the 'UIGadgetLifecycleChanged' event with the 'UIGadgetLifecycleState.Destroyed' state will not be emitted.

    Declaration
    protected virtual void OnDestroy()
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    OnDeviceOrientationChanged(DeviceOrientationEventArgs)

    Overrides this method if want to handle behavior when the device orientation is changed.

    Declaration
    protected virtual void OnDeviceOrientationChanged(DeviceOrientationEventArgs e)
    Parameters
    Type Name Description
    DeviceOrientationEventArgs e

    The device orientation changed event argument.

    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    OnLocaleChanged(LocaleChangedEventArgs)

    Overrides this method if want to handle behavior when the system language is changed.

    Declaration
    protected virtual void OnLocaleChanged(LocaleChangedEventArgs e)
    Parameters
    Type Name Description
    LocaleChangedEventArgs e

    The locale changed event argument.

    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    OnLowBattery(LowBatteryEventArgs)

    Overrides this method if want to handle behavior when the system battery is low.

    Declaration
    protected virtual void OnLowBattery(LowBatteryEventArgs e)
    Parameters
    Type Name Description
    LowBatteryEventArgs e

    The low batter event argument.

    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    OnLowMemory(LowMemoryEventArgs)

    Overrides this method if want to handle behavior when the system memory is low.

    Declaration
    protected virtual void OnLowMemory(LowMemoryEventArgs e)
    Parameters
    Type Name Description
    LowMemoryEventArgs e

    The low memory event argument.

    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    OnMessageReceived(UIGadgetMessageReceivedEventArgs)

    Overrides this method if want to handle behavior when the message is received.

    Declaration
    protected virtual void OnMessageReceived(UIGadgetMessageReceivedEventArgs e)
    Parameters
    Type Name Description
    UIGadgetMessageReceivedEventArgs e

    The message received event argument.

    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    OnPause()

    Overrides this method if want to handle behavior when the UIGadget is paused. If 'base.OnPause()' is not called. the event 'UIGadgetLifecycleChanged' with the 'UIGadgetLifecycleState.Paused' state will not be emitted.

    Declaration
    protected virtual void OnPause()
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    OnPreCreate()

    Override this method to define the behavior when the UIGadget is pre-created. Calling 'base.OnPreCreate()' is necessary in order to emit the 'UIGadgetLifecycleChanged' event with the 'UIGadgetLifecycleState.PreCreated' state.

    Declaration
    protected virtual void OnPreCreate()
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    OnRegionFormatChanged(RegionFormatChangedEventArgs)

    Overrides this method if want to handle behavior when the region format is changed.

    Declaration
    protected virtual void OnRegionFormatChanged(RegionFormatChangedEventArgs e)
    Parameters
    Type Name Description
    RegionFormatChangedEventArgs e

    The region format changed event argument.

    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    OnResume()

    Overrides this method if want to handle behavior when the UIGadget is resumed. If 'base.OnResume()' is not called. the event 'UIGadgetLifecycleChanged' with the 'UIGadgetLifecycleState.Resumed' state will not be emitted.

    Declaration
    protected virtual void OnResume()
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    SendMessage(Bundle)

    Sends the message to the UIGadget. The message will be delived to the OnMessageReceived() method.

    Declaration
    public void SendMessage(Bundle message)
    Parameters
    Type Name Description
    Bundle message

    The message

    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    Events

    View Source

    DataLoaderLifecycleChanged

    Occurs when the lifecycle of the DataLoader is changed.

    Declaration
    public event EventHandler<DataLoaderLifecycleChangedEventArgs> DataLoaderLifecycleChanged
    Event Type
    Type Description
    EventHandler<><DataLoaderLifecycleChangedEventArgs>
    Remarks

    This event is raised when the state of DataLoader changes. It provides information about the current state through the DataLoaderLifecycleChangedEventArgs argument.

    Explicit Interface Implementations

    View Source

    IUIGadget.OnAppControlReceived(AppControlReceivedEventArgs)

    Declaration
    void IUIGadget.OnAppControlReceived(AppControlReceivedEventArgs args)
    Parameters
    Type Name Description
    AppControlReceivedEventArgs args
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    IUIGadget.OnCreate()

    Declaration
    object IUIGadget.OnCreate()
    Returns
    Type Description
    object
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    IUIGadget.OnDestroy()

    Declaration
    void IUIGadget.OnDestroy()
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    IUIGadget.OnDeviceOrientationChanged(DeviceOrientationEventArgs)

    Declaration
    void IUIGadget.OnDeviceOrientationChanged(DeviceOrientationEventArgs args)
    Parameters
    Type Name Description
    DeviceOrientationEventArgs args
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    IUIGadget.OnLocaleChanged(LocaleChangedEventArgs)

    Declaration
    void IUIGadget.OnLocaleChanged(LocaleChangedEventArgs args)
    Parameters
    Type Name Description
    LocaleChangedEventArgs args
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    IUIGadget.OnLowBattery(LowBatteryEventArgs)

    Declaration
    void IUIGadget.OnLowBattery(LowBatteryEventArgs args)
    Parameters
    Type Name Description
    LowBatteryEventArgs args
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    IUIGadget.OnLowMemory(LowMemoryEventArgs)

    Declaration
    void IUIGadget.OnLowMemory(LowMemoryEventArgs args)
    Parameters
    Type Name Description
    LowMemoryEventArgs args
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    IUIGadget.OnMessageReceived(UIGadgetMessageReceivedEventArgs)

    Declaration
    void IUIGadget.OnMessageReceived(UIGadgetMessageReceivedEventArgs e)
    Parameters
    Type Name Description
    UIGadgetMessageReceivedEventArgs e
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    IUIGadget.OnPause()

    Declaration
    void IUIGadget.OnPause()
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    IUIGadget.OnPreCreate()

    Declaration
    void IUIGadget.OnPreCreate()
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    IUIGadget.OnRegionFormatChanged(RegionFormatChangedEventArgs)

    Declaration
    void IUIGadget.OnRegionFormatChanged(RegionFormatChangedEventArgs args)
    Parameters
    Type Name Description
    RegionFormatChangedEventArgs args
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    View Source

    IUIGadget.OnResume()

    Declaration
    void IUIGadget.OnResume()
    Remarks

    This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.

    Implements

    IUIGadget

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX