Class NUIWidgetApplication

    Definition

    Namespace:
    Tizen.NUI
    Assembly:
    Tizen.NUI.dll

    Represents an application that have UI screen. The NUIWidgetApplication class has a default stage.

    public class NUIWidgetApplication : CoreApplication
    Inheritance
    object
    Application
    CoreApplication
    NUIWidgetApplication

    Constructors

    View Source

    NUIWidgetApplication(Dictionary<Type, string>)

    The constructor for multi widget class and instance.

    Declaration
    public NUIWidgetApplication(Dictionary<System.Type, string> widgetTypes)
    Parameters
    Type Name Description
    Dictionary<, ><System.Type, string> widgetTypes

    List of derived widget class type.

    View Source

    NUIWidgetApplication(Type, string)

    The default constructor with stylesheet.

    Declaration
    public NUIWidgetApplication(System.Type widgetType, string styleSheet)
    Parameters
    Type Name Description
    System.Type widgetType

    Derived widget class type.

    string styleSheet

    The styleSheet url.

    Remarks

    Widget ID will be replaced as the application ID.

    View Source

    NUIWidgetApplication(Type)

    The default constructor.

    Declaration
    public NUIWidgetApplication(System.Type widgetType)
    Parameters
    Type Name Description
    System.Type widgetType

    Derived widget class type.

    Remarks

    Widget ID will be replaced as the application ID.

    Properties

    View Source

    IsUsingXaml

    Set to true if XAML is used. This must be called before or immediately after the NUIWidgetApplication constructor is called. The default value is true.

    Declaration
    public static bool IsUsingXaml { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    This must be called before or immediately after the NUIWidgetApplication constructor is called.

    Methods

    View Source

    AddWidgetType(Dictionary<Type, string>)

    Add WidgetInfo in runtime

    Declaration
    public void AddWidgetType(Dictionary<System.Type, string> widgetTypes)
    Parameters
    Type Name Description
    Dictionary<, ><System.Type, string> widgetTypes

    Derived widget class type.

    View Source

    AddWidgetType(Type)

    Add WidgetInfo in runtime

    Declaration
    public void AddWidgetType(System.Type widgetType)
    Parameters
    Type Name Description
    System.Type widgetType

    Derived widget class type.

    View Source

    Exit()

    The Exit method of NUIWidgetApplication.

    Declaration
    public override void Exit()
    Overrides
    CoreApplication.Exit()
    Remarks

    Note that calling this method will terminate the entire application. Ensure that all necessary cleanup operations are performed before calling this method.

    View Source

    FlushUpdateMessages()

    Flush render/update thread messages synchronously.

    Declaration
    public void FlushUpdateMessages()
    Remarks

    This function will relayout forcibily. This function is used for advanced developer. It will make main-thread overhead if you call this function frequencely.

    View Source

    OnCreate()

    This method is called when the application is created. Override this method to handle custom initialization logic.

    Declaration
    protected override void OnCreate()
    Overrides
    CoreApplication.OnCreate()
    View Source

    OnDeviceOrientationChanged(DeviceOrientationEventArgs)

    This method is to handle behavior when the device orientation is changed. When device is rotated to ccw or cw, this event occurs. In addition, this event is different to window orientation changed event. The window orientation event is for per a window and occurs when some flags should be set before.

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

    The device orientation changed event argument

    Overrides
    CoreApplication.OnDeviceOrientationChanged(DeviceOrientationEventArgs)
    View Source

    OnLocaleChanged(LocaleChangedEventArgs)

    Override this method to implement custom behavior when the system locale changes.

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

    The event arguments containing the new locale information.

    Overrides
    CoreApplication.OnLocaleChanged(LocaleChangedEventArgs)
    View Source

    OnLowBattery(LowBatteryEventArgs)

    The OnLowBattery method is called when the device's battery level is low. This method can be overridden to implement custom behavior when the device's battery level is low.

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

    The event arguments containing the battery status.

    Overrides
    CoreApplication.OnLowBattery(LowBatteryEventArgs)
    View Source

    OnLowMemory(LowMemoryEventArgs)

    This method is called when the system is running low on memory. Overrides this method if want to handle OnLowMemory behavior.

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

    The event arguments containing the memory status.

    Overrides
    CoreApplication.OnLowMemory(LowMemoryEventArgs)
    View Source

    OnPreCreate()

    Overrides this method if you want to handle behavior before the application is created. This method is guaranteed to be called before OnCreate() is called.

    Declaration
    protected virtual void OnPreCreate()
    View Source

    OnRegionFormatChanged(RegionFormatChangedEventArgs)

    This method can be overridden to implement custom behavior when the region format changes.

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

    The event arguments containing information about the region format change.

    Overrides
    CoreApplication.OnRegionFormatChanged(RegionFormatChangedEventArgs)
    View Source

    OnTerminate()

    This method is called when the application is terminated. This method is overridden to perform custom actions when the application terminates.

    Declaration
    protected override void OnTerminate()
    Overrides
    CoreApplication.OnTerminate()
    View Source

    Run(string[])

    Runs the NUI widget application. This method starts the main loop of the application.

    Declaration
    public override void Run(string[] args)
    Parameters
    Type Name Description
    string[] args

    Arguments from commandline.

    Overrides
    CoreApplication.Run(string[])

    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