Class NUIWidgetApplication
Definition
- Assembly:
- Tizen.NUI.dll
Represents an application that have UI screen. The NUIWidgetApplication class has a default stage.
public class NUIWidgetApplication : CoreApplication
- Inheritance
Constructors
View SourceNUIWidgetApplication(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. |
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.
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 SourceIsUsingXaml
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 SourceAddWidgetType(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. |
AddWidgetType(Type)
Add WidgetInfo in runtime
Declaration
public void AddWidgetType(System.Type widgetType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | widgetType | Derived widget class type. |
Exit()
The Exit method of NUIWidgetApplication.
Declaration
public override void Exit()
Overrides
Remarks
Note that calling this method will terminate the entire application. Ensure that all necessary cleanup operations are performed before calling this method.
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.
OnCreate()
This method is called when the application is created. Override this method to handle custom initialization logic.
Declaration
protected override void OnCreate()
Overrides
View SourceOnDeviceOrientationChanged(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
View SourceOnLocaleChanged(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
View SourceOnLowBattery(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
View SourceOnLowMemory(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
View SourceOnPreCreate()
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()
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
View SourceOnTerminate()
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
View SourceRun(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. |