Class NUIApplication

    Definition

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

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

    public class NUIApplication : CoreApplication, IDisposable
    Inheritance
    object
    Application
    CoreApplication
    NUIApplication
    Implements
    System.IDisposable

    Constructors

    View Source

    NUIApplication()

    Initializes a new instance of the NUIApplication class. This is the default constructor that initializes the NUI application using the NUICoreBackend.

    Declaration
    public NUIApplication()
    View Source

    NUIApplication(string, WindowMode, WindowType)

    The constructor with a stylesheet, window mode and default window type. It is the only way to create an IME window.

    Declaration
    public NUIApplication(string styleSheet, NUIApplication.WindowMode windowMode, WindowType type)
    Parameters
    Type Name Description
    string styleSheet

    The styleSheet URL.

    NUIApplication.WindowMode windowMode

    The windowMode.

    WindowType type

    The default window type.

    View Source

    NUIApplication(string, WindowMode)

    The constructor with a stylesheet and window mode. This constructor initializes the NUIApplication with a specified stylesheet and window mode.

    Declaration
    public NUIApplication(string styleSheet, NUIApplication.WindowMode windowMode)
    Parameters
    Type Name Description
    string styleSheet

    The styleSheet url.

    NUIApplication.WindowMode windowMode

    The windowMode.

    View Source

    NUIApplication(string)

    The constructor with a stylesheet. This constructor initializes a new instance of the Tizen.NUI.NUIApplication class with the specified stylesheet.

    Declaration
    public NUIApplication(string styleSheet)
    Parameters
    Type Name Description
    string styleSheet

    The URL of the stylesheet to apply to the application.

    Properties

    View Source

    MultilingualResourceManager

    The MultilingualResourceManager property provides access to a System.Resources.ResourceManager instance that can be used to manage resources for different languages.

    Declaration
    public static Resources.ResourceManager MultilingualResourceManager { get; set; }
    Property Value
    Type Description
    Tizen.System.Resources.ResourceManager

    Methods

    View Source

    AddIdle(Delegate)

    Ensures that the function passed in is called from the main loop when it is idle.

    Declaration
    public bool AddIdle(Delegate func)
    Parameters
    Type Name Description
    Tizen.System.Delegate func

    The function to call

    Returns
    Type Description
    bool

    true if added successfully, false otherwise

    View Source

    Exit()

    Exits the NUIApplication. This method causes the application to terminate gracefully.

    Declaration
    public override void Exit()
    Overrides
    CoreApplication.Exit()
    View Source

    OnAppControlReceived(AppControlReceivedEventArgs)

    This method is overridden to handle the application control event received.

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

    The event arguments containing the received application control.

    Overrides
    CoreApplication.OnAppControlReceived(AppControlReceivedEventArgs)
    View Source

    OnCreate()

    The OnCreate method of NUIApplication class. 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

    OnLocaleChanged(LocaleChangedEventArgs)

    The OnLocaleChanged method is called when the system locale settings have changed. Overrides this method if you want to handle behavior.

    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 system is under Low Battery status. Overrides this method if you want to handle behavior.

    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)

    The OnLowMemory method is called when the system is under Low Memory status. Overrides this method if you want to handle behavior.

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

    The event arguments containing low memory status information.

    Overrides
    CoreApplication.OnLowMemory(LowMemoryEventArgs)
    View Source

    OnPause()

    Overrides this method if you want to handle behavior when the application is paused.

    Declaration
    protected virtual void OnPause()
    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 is called when the system's region format settings have changed. It provides an opportunity to handle any necessary adjustments or updates based on the new region format. Overrides this method if you want to handle behavior.

    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

    OnResume()

    Overrides this method if you want to handle behavior when the application is resumed.

    Declaration
    protected virtual void OnResume()
    View Source

    OnTerminate()

    This method is called when the application is terminated. Overrides this method if you want to handle behavior.

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

    RegisterAssembly(Assembly)

    Registers the specified assembly to XAML, allowing types within the assembly to be used in XAML files.

    Declaration
    public static void RegisterAssembly(Assembly assembly)
    Parameters
    Type Name Description
    System.Reflection.Assembly assembly

    The assembly to register.

    View Source

    Run(string[])

    This method starts the main loop of the application, allowing it to receive events and run its lifecycle.

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

    Arguments from commandline. These arguments can be used to customize the application behavior at startup.

    Overrides
    CoreApplication.Run(string[])
    Examples
    static void Main(string[] args)
    {
        NUIApplication app = new NUIApplication();
        app.Run(args);
    }

    Events

    View Source

    Paused

    The event handler that gets called when the application is paused. This event is triggered when the application transitions to a paused state.

    Declaration
    public event EventHandler Paused
    Event Type
    Type Description
    System.EventHandler
    Examples
    NUIApplication app = new NUIApplication();
    app.Paused += OnAppPaused;
    
    void OnAppPaused(object sender, EventArgs e)
    {
        // Perform actions when the application is paused
    }
    View Source

    Resumed

    The Resumed event handler. This event is triggered when the application resumes from being paused or stopped. It can be used to perform actions that need to be executed when the application becomes active again.

    Declaration
    public event EventHandler Resumed
    Event Type
    Type Description
    System.EventHandler
    Examples
    NUIApplication app = new NUIApplication();
    app.Resumed += OnAppResumed;
    
    void OnAppResumed(object sender, EventArgs e)
    {
        // Perform actions when the application is resumed
    }

    Implements

    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX