Class WidgetControl

Definition

Namespace:
Tizen.Applications
Assembly:
Tizen.Applications.WidgetControl.dll
API Level:
3

The class for receiving widget events and sending data to the widget.

C#
Copy
public class WidgetControl : IDisposable
Inheritance
WidgetControl
Implements
System.IDisposable

Constructors

View Source

WidgetControl(String)

The constructor of the WidgetControl object.

Declaration
C#
Copy
public WidgetControl(string widgetId)
Parameters
Type Name Description
System.String widgetId

Widget ID.

API Level: 3

Properties

View Source

Id

The widget ID.

Declaration
C#
Copy
public string Id { get; }
Property Value
Type Description
System.String
API Level: 3
View Source

IsNoDisplay

The flag value for "nodisplay".

Declaration
C#
Copy
public bool IsNoDisplay { get; }
Property Value
Type Description
Boolean
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer

Methods

View Source

CreateAll(String)

Factory method for the WidgetControl. It will create all the objects of WidgetControl based on the package ID.

Declaration
C#
Copy
public static WidgetControl[] CreateAll(string pkgId)
Parameters
Type Name Description
System.String pkgId

Package ID.

Returns
Type Description
WidgetControl[]
Exceptions
Type Condition
System.ArgumentException

Thrown when failed because of an invalid argument.

System.InvalidOperationException

Thrown in case of failed conditions.

UnauthorizedAccessException

Thrown when an application does not have the privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer
View Source

Dispose()

Releases all the resources used by the WidgetControl class.

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Finalize()

Finalizer of the WidgetControl class.

Declaration
C#
Copy
protected void Finalize()
View Source

GetIconPath(String)

Gets the widget icon path.

Declaration
C#
Copy
public string GetIconPath(string lang)
Parameters
Type Name Description
System.String lang

Language.

Returns
Type Description
System.String
Exceptions
Type Condition
ArgumentNullException

Thrown when the argument is null.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer
View Source

GetInstances()

Gets the objects for widget instance information.

Declaration
C#
Copy
public IEnumerable<WidgetControl.Instance> GetInstances()
Returns
Type Description
System.Collections.Generic.IEnumerable<WidgetControl.Instance>
Exceptions
Type Condition
System.InvalidOperationException

Thrown in case of failed conditions.

System.NotSupportedException

Thrown when the API is not supported in this device.

UnauthorizedAccessException

Thrown when an application does not have the privilege to access this method.

API Level: 3
View Source

GetName(String)

Gets the widget name.

Declaration
C#
Copy
public string GetName(string lang)
Parameters
Type Name Description
System.String lang

Language.

Returns
Type Description
System.String
Exceptions
Type Condition
ArgumentNullException

Thrown when the argument is null.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer
View Source

GetScales()

Gets the objects for widget scale information.

Declaration
C#
Copy
public IEnumerable<WidgetControl.Scale> GetScales()
Returns
Type Description
System.Collections.Generic.IEnumerable<WidgetControl.Scale>
Exceptions
Type Condition
System.InvalidOperationException

Thrown in case of failed conditions.

UnauthorizedAccessException

Thrown when an application does not have the privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer
View Source

GetWidgetIds(String)

Gets all the widget IDs by the package ID.

Declaration
C#
Copy
public static string[] GetWidgetIds(string pkgId)
Parameters
Type Name Description
System.String pkgId
Returns
Type Description
System.String[]
Exceptions
Type Condition
System.ArgumentException

Thrown when failed because of an invalid argument.

System.InvalidOperationException

Thrown in case of failed conditions.

UnauthorizedAccessException

Thrown when an application does not have the privilege to access this method.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer

Events

View Source

Created

The event handler for a created widget instance.

Declaration
C#
Copy
public event EventHandler<WidgetLifecycleEventArgs> Created
Event Type
Type Description
System.EventHandler<WidgetLifecycleEventArgs>
Exceptions
Type Condition
System.InvalidOperationException

Thrown in case of failed conditions.

UnauthorizedAccessException

Thrown when an application does not have the privilege to access this method.

API Level: 3
View Source

Destroyed

The event handler for a destroyed widget instance.

Declaration
C#
Copy
public event EventHandler<WidgetLifecycleEventArgs> Destroyed
Event Type
Type Description
System.EventHandler<WidgetLifecycleEventArgs>
Exceptions
Type Condition
System.InvalidOperationException

Thrown in case of failed conditions.

UnauthorizedAccessException

Thrown when an application does not have the privilege to access this method.

API Level: 3
View Source

Paused

The event handler for a paused widget instance.

Declaration
C#
Copy
public event EventHandler<WidgetLifecycleEventArgs> Paused
Event Type
Type Description
System.EventHandler<WidgetLifecycleEventArgs>
Exceptions
Type Condition
System.InvalidOperationException

Thrown in case of failed conditions.

UnauthorizedAccessException

Thrown when an application does not have the privilege to access this method.

API Level: 3
View Source

Resumed

The event handler for a resumed widget instance.

Declaration
C#
Copy
public event EventHandler<WidgetLifecycleEventArgs> Resumed
Event Type
Type Description
System.EventHandler<WidgetLifecycleEventArgs>
Exceptions
Type Condition
System.InvalidOperationException

Thrown in case of failed conditions.

UnauthorizedAccessException

Thrown when an application does not have the privilege to access this method.

API Level: 3

Implements

System.IDisposable