Class NUIGadget
Definition
- Assembly:
- Tizen.NUI.Gadget.dll
This class represents a NUIGadget controlled lifecycles.
public abstract class NUIGadget
- Inheritance
-
objectNUIGadget
Constructors
View SourceNUIGadget(NUIGadgetType)
Initializes the gadget.
Declaration
public NUIGadget(NUIGadgetType type)
Parameters
Type | Name | Description |
---|---|---|
NUIGadgetType | type | The type of the NUIGadget. |
Properties
View SourceClassName
Gets the class name.
Declaration
public string ClassName { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
This property is set before the OnCreate() is called, after the instance has been created.
MainView
Gets the main view.
Declaration
public View MainView { get; }
Property Value
Type | Description |
---|---|
View |
NUIGadgetInfo
Gets the class representing information of the current gadget.
Declaration
public NUIGadgetInfo NUIGadgetInfo { get; }
Property Value
Type | Description |
---|---|
NUIGadgetInfo |
Remarks
This property is set before the OnCreate() is called, after the instance has been created.
NUIGadgetResourceManager
Gets the resource manager.
Declaration
public NUIGadgetResourceManager NUIGadgetResourceManager { get; }
Property Value
Type | Description |
---|---|
NUIGadgetResourceManager |
Remarks
This property is set before the OnCreate() is called, after the instance has been created.
State
Gets the lifecycle state.
Declaration
public NUIGadgetLifecycleState State { get; }
Property Value
Type | Description |
---|---|
NUIGadgetLifecycleState |
Type
Gets the type.
Declaration
public NUIGadgetType Type { get; }
Property Value
Type | Description |
---|---|
NUIGadgetType |
Methods
View SourceFinish()
Finishes the gadget.
Declaration
public void Finish()
OnAppControlReceived(AppControlReceivedEventArgs)
Overrides this method if want to handle behavior when the gadget receives the appcontrol message.
Declaration
protected virtual void OnAppControlReceived(AppControlReceivedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
AppControlReceivedEventArgs | e | The appcontrol received event argument. |
OnCreate()
Overrides this method if want to handle behavior when the gedget is started. If 'base.OnCreate()' is not called, the event 'NUIGadgetLifecycleChanged' with the 'NUIGadgetLifecycleState.Created' state will not be emitted.
Declaration
protected virtual View OnCreate()
Returns
Type | Description |
---|---|
View | The main view object. |
OnDestroy()
Overrides this method if want to handle behavior when the gadget is destroyed. If 'base.OnDestroy()' is not called. the event 'NUIGadgetLifecycleChanged' with the 'NUIGadgetLifecycleState.Destroyed' state will not be emitted.
Declaration
protected virtual void OnDestroy()
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. |
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. |
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. |
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. |
OnPause()
Overrides this method if want to handle behavior when the gadget is paused. If 'base.OnPause()' is not called. the event 'NUIGadgetLifecycleChanged' with the 'NUIGadgetLifecycleState.Paused' state will not be emitted.
Declaration
protected virtual void OnPause()
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. |
OnResume()
Overrides this method if want to handle behavior when the gadget is resumed. If 'base.OnResume()' is not called. the event 'NUIGadgetLifecycleChanged' with the 'NUIGadgetLifecycleState.Resumed' state will not be emitted.
Declaration
protected virtual void OnResume()