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
    Inheritance
    object
    Application
    CoreApplication
    NUIApplication

    Constructors

    View Source

    NUIApplication()

    The default constructor.

    Declaration
    public NUIApplication()
    View Source

    NUIApplication(string, WindowMode, CoreTask)

    The constructor with a stylesheet, window mode, coretask

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

    The styleSheet URL.

    NUIApplication.WindowMode windowMode

    The windowMode.

    CoreTask task

    True If app creates a UI Thread

    View Source

    NUIApplication(string, WindowMode, Size2D, Position2D, CoreTask)

    The constructor with a stylesheet, window mode, window size, position, coretask

    Declaration
    public NUIApplication(string styleSheet, NUIApplication.WindowMode windowMode, Size2D windowSize, Position2D windowPosition, CoreTask task)
    Parameters
    Type Name Description
    string styleSheet

    The styleSheet URL.

    NUIApplication.WindowMode windowMode

    The windowMode.

    Size2D windowSize

    The window size.

    Position2D windowPosition

    The window position.

    CoreTask task

    True If app creates a UI Thread

    View Source

    NUIApplication(string, WindowMode, Size2D, Position2D)

    The constructor with a stylesheet, window mode, window size, and position.

    Declaration
    public NUIApplication(string styleSheet, NUIApplication.WindowMode windowMode, Size2D windowSize, Position2D windowPosition)
    Parameters
    Type Name Description
    string styleSheet

    The styleSheet URL.

    NUIApplication.WindowMode windowMode

    The windowMode.

    Size2D windowSize

    The window size.

    Position2D windowPosition

    The window position.

    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.

    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, Size2D, Position2D, IBorderInterface, WindowMode)

    The constructor with a stylesheet, size, position, boderInterface and window mode

    Declaration
    public NUIApplication(string styleSheet, Size2D windowSize, Position2D windowPosition, IBorderInterface borderInterface, NUIApplication.WindowMode windowMode = default)
    Parameters
    Type Name Description
    string styleSheet

    The styleSheet URL.

    Size2D windowSize

    The window size.

    Position2D windowPosition

    The window position.

    IBorderInterface borderInterface

    IBorderInterfaceIf borderInterface is null, defaultBorder is enabled.

    NUIApplication.WindowMode windowMode

    The windowMode.

    View Source

    NUIApplication(string, Size2D, Position2D)

    The constructor with a stylesheet, window size, and position.

    Declaration
    public NUIApplication(string styleSheet, Size2D windowSize, Position2D windowPosition)
    Parameters
    Type Name Description
    string styleSheet

    The styleSheet URL.

    Size2D windowSize

    The window size.

    Position2D windowPosition

    The window position.

    View Source

    NUIApplication(string)

    The constructor with a stylesheet.

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

    The styleSheet url.

    View Source

    NUIApplication(BackendType, WindowMode, Size2D, Position2D, string)

    Internal inhouse constructor with Graphics Backend Type

    Declaration
    public NUIApplication(Graphics.BackendType backend, NUIApplication.WindowMode windowMode = default, Size2D windowSize = null, Position2D windowPosition = null, string styleSheet = "")
    Parameters
    Type Name Description
    Graphics.BackendType backend
    NUIApplication.WindowMode windowMode
    Size2D windowSize
    Position2D windowPosition
    string styleSheet
    View Source

    NUIApplication(ThemeOptions, IBorderInterface)

    The constructor with theme option and borderInterface.

    Declaration
    public NUIApplication(NUIApplication.ThemeOptions option, IBorderInterface borderInterface)
    Parameters
    Type Name Description
    NUIApplication.ThemeOptions option

    The theme option.

    IBorderInterface borderInterface

    IBorderInterfaceIf borderInterface is null, defaultBorder is enabled.

    View Source

    NUIApplication(ThemeOptions, WindowData)

    The constructor with a ThemeOptions, WindowData

    Declaration
    public NUIApplication(NUIApplication.ThemeOptions option, WindowData windowData)
    Parameters
    Type Name Description
    NUIApplication.ThemeOptions option

    The theme option.

    WindowData windowData

    The default window data

    View Source

    NUIApplication(ThemeOptions)

    The constructor with theme option.

    Declaration
    public NUIApplication(NUIApplication.ThemeOptions option)
    Parameters
    Type Name Description
    NUIApplication.ThemeOptions option

    The theme option.

    View Source

    NUIApplication(Size2D, Position2D, ThemeOptions, IBorderInterface)

    The constructor with window size, position, theme option and borderInterface.

    Declaration
    public NUIApplication(Size2D windowSize, Position2D windowPosition, NUIApplication.ThemeOptions option, IBorderInterface borderInterface)
    Parameters
    Type Name Description
    Size2D windowSize

    The window size.

    Position2D windowPosition

    The window position.

    NUIApplication.ThemeOptions option

    The theme option.

    IBorderInterface borderInterface

    IBorderInterfaceIf borderInterface is null, defaultBorder is enabled.

    View Source

    NUIApplication(Size2D, Position2D, ThemeOptions)

    The constructor with window size and position and theme option.

    Declaration
    public NUIApplication(Size2D windowSize, Position2D windowPosition, NUIApplication.ThemeOptions option)
    Parameters
    Type Name Description
    Size2D windowSize

    The window size.

    Position2D windowPosition

    The window position.

    NUIApplication.ThemeOptions option

    The theme option.

    View Source

    NUIApplication(Size2D, Position2D)

    The constructor with window size and position.

    Declaration
    public NUIApplication(Size2D windowSize, Position2D windowPosition)
    Parameters
    Type Name Description
    Size2D windowSize

    The window size.

    Position2D windowPosition

    The window position.

    Properties

    View Source

    AppId

    Gets the Application Id.

    Declaration
    public string AppId { get; }
    Property Value
    Type Description
    string
    View Source

    CurrentLoadedXaml

    Current loaded xaml's full name.

    Declaration
    public static string CurrentLoadedXaml { get; set; }
    Property Value
    Type Description
    string
    View Source

    IsUsingXaml

    Set to true if XAML is used. This must be called before or immediately after the NUIApplication 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 NUIApplication constructor is called.

    View Source

    MultilingualResourceManager

    ResourceManager to handle multilingual.

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

    Window

    Gets the window instance.

    Declaration
    public Window Window { get; }
    Property Value
    Type Description
    Window

    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(System.Delegate func)
    Parameters
    Type Name Description
    System.Delegate func

    The function to call

    Returns
    Type Description
    bool

    true if added successfully, false otherwise

    View Source

    Exit()

    Exits the NUIApplication.

    Declaration
    public override void Exit()
    Overrides
    CoreApplication.Exit()
    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

    GetDefaultWindow()

    Gets the default window.

    Declaration
    public static Window GetDefaultWindow()
    Returns
    Type Description
    Window

    The default Window.

    View Source

    GetScreenSize()

    Gets the screen size

    Declaration
    public static Size GetScreenSize()
    Returns
    Type Description
    Size

    Screen size

    View Source

    OnAppControlReceived(AppControlReceivedEventArgs)

    Overrides this method if you want to handle behavior.

    Declaration
    protected override void OnAppControlReceived(AppControlReceivedEventArgs e)
    Parameters
    Type Name Description
    AppControlReceivedEventArgs e
    Overrides
    CoreApplication.OnAppControlReceived(AppControlReceivedEventArgs)
    View Source

    OnCreate()

    Overrides this method if you want to handle behavior.

    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)

    Overrides this method if you want to handle behavior.

    Declaration
    protected override void OnLocaleChanged(LocaleChangedEventArgs e)
    Parameters
    Type Name Description
    LocaleChangedEventArgs e
    Overrides
    CoreApplication.OnLocaleChanged(LocaleChangedEventArgs)
    View Source

    OnLowBattery(LowBatteryEventArgs)

    Overrides this method if you want to handle behavior.

    Declaration
    protected override void OnLowBattery(LowBatteryEventArgs e)
    Parameters
    Type Name Description
    LowBatteryEventArgs e
    Overrides
    CoreApplication.OnLowBattery(LowBatteryEventArgs)
    View Source

    OnLowMemory(LowMemoryEventArgs)

    Overrides this method if you want to handle behavior.

    Declaration
    protected override void OnLowMemory(LowMemoryEventArgs e)
    Parameters
    Type Name Description
    LowMemoryEventArgs e
    Overrides
    CoreApplication.OnLowMemory(LowMemoryEventArgs)
    View Source

    OnPause()

    Overrides this method if you want to handle behavior.

    Declaration
    protected virtual void OnPause()
    View Source

    OnPreCreate()

    Overrides this method if you want to handle behavior.

    Declaration
    protected virtual void OnPreCreate()
    View Source

    OnRegionFormatChanged(RegionFormatChangedEventArgs)

    Overrides this method if you want to handle behavior.

    Declaration
    protected override void OnRegionFormatChanged(RegionFormatChangedEventArgs e)
    Parameters
    Type Name Description
    RegionFormatChangedEventArgs e
    Overrides
    CoreApplication.OnRegionFormatChanged(RegionFormatChangedEventArgs)
    View Source

    OnResume()

    Overrides this method if you want to handle behavior.

    Declaration
    protected virtual void OnResume()
    View Source

    OnTerminate()

    Overrides this method if you want to handle behavior.

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

    Preload()

    This is used to improve application launch performance.

    Declaration
    public static void Preload()
    View Source

    RegisterAssembly(Assembly)

    Register the assembly to XAML.

    Declaration
    public static void RegisterAssembly(Assembly assembly)
    Parameters
    Type Name Description
    Assembly assembly
    View Source

    Run(string[])

    Runs the NUIApplication.

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

    Arguments from commandline.

    Overrides
    CoreApplication.Run(string[])
    View Source

    SetRenderRefreshRate(uint)

    Sets the number of frames per render.

    Declaration
    public static void SetRenderRefreshRate(uint numberOfVSyncsPerRender)
    Parameters
    Type Name Description
    uint numberOfVSyncsPerRender

    The number of vsyncs between successive renders.

    Remarks

    Suggest this is a power of two: 1 - render each vsync frame. 2 - render every other vsync frame. 4 - render every fourth vsync frame. 8 - render every eighth vsync frame.
    For example, if an application runs on 60 FPS and SetRenderRefreshRate(2) is called, the frames per second will be changed to 30.

    Events

    View Source

    Paused

    Occurs whenever the application is paused.

    Declaration
    public event EventHandler Paused
    Event Type
    Type Description
    EventHandler
    View Source

    Resumed

    Occurs whenever the application is resumed.

    Declaration
    public event EventHandler Resumed
    Event Type
    Type Description
    EventHandler
    View Source

    XamlLoaded

    Xaml loaded event.

    Declaration
    public static event NUIApplication.XamlLoadedHandler XamlLoaded
    Event Type
    Type Description
    NUIApplication.XamlLoadedHandler

    Extension Methods

    EXamlExtensions.LoadFromEXaml<T>(T, string)
    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    EXamlExtensions.LoadFromEXamlPath<TXaml>(TXaml, string)
    EXamlExtensions.LoadFromEXamlPath<T>(T, Type)
    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