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#Copypublic class WidgetControl : IDisposable
- Inheritance
-
System.ObjectWidgetControl
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic WidgetControl(string widgetId)
Parameters
Type | Name | Description |
---|---|---|
System.String | widgetId | Widget ID. |
API Level: 3
Properties
Declaration
C#Copypublic string Id { get; }
Property Value
Type | Description |
---|---|
System.String |
API Level: 3
Declaration
C#Copypublic bool IsNoDisplay { get; }
Property Value
Type | Description |
---|---|
Boolean |
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer
Feature: http://tizen.org/feature/shell.appwidget
Declaration
C#Copypublic string MainAppId { get; }
Property Value
Type | Description |
---|---|
System.String |
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer
Feature: http://tizen.org/feature/shell.appwidget
Declaration
C#Copypublic string PackageId { get; }
Property Value
Type | Description |
---|---|
System.String |
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer
Feature: http://tizen.org/feature/shell.appwidget
Declaration
C#Copypublic string SetupAppId { get; }
Property Value
Type | Description |
---|---|
System.String |
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
System.InvalidOperationException | Thrown in case of failed conditions. |
API Level: 8
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer
Feature: http://tizen.org/feature/shell.appwidget
Methods
CreateAll(String)
Factory method for the WidgetControl. It will create all the objects of WidgetControl based on the package ID.
Declaration
C#Copypublic static WidgetControl[] CreateAll(string pkgId)
Parameters
Type | Name | Description |
---|---|---|
System.String | pkgId | Package ID. |
Returns
Type | Description |
---|---|
WidgetControl[] | The widget control array. |
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 required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer
Feature: http://tizen.org/feature/shell.appwidget
Declaration
C#Copypublic void Dispose()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown in case of failed conditions. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Feature: http://tizen.org/feature/shell.appwidget
Declaration
C#Copyprotected void Finalize()
Declaration
C#Copypublic string GetIconPath(string lang)
Parameters
Type | Name | Description |
---|---|---|
System.String | lang | Language. |
Returns
Type | Description |
---|---|
System.String | The widget icon path. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when the argument is null. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer
Feature: http://tizen.org/feature/shell.appwidget
Declaration
C#Copypublic IEnumerable<WidgetControl.Instance> GetInstances()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<WidgetControl.Instance> | The instances list. |
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 required privileges to access this method. |
API Level: 3
Feature: http://tizen.org/feature/shell.appwidget
Declaration
C#Copypublic string GetName(string lang)
Parameters
Type | Name | Description |
---|---|---|
System.String | lang | Language. |
Returns
Type | Description |
---|---|
System.String | The widget name. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when the argument is null. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer
Feature: http://tizen.org/feature/shell.appwidget
Declaration
C#Copypublic IEnumerable<WidgetControl.Scale> GetScales()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<WidgetControl.Scale> | The scales list. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown in case of failed conditions. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer
Feature: http://tizen.org/feature/shell.appwidget
Declaration
C#Copypublic static string[] GetWidgetIds(string pkgId)
Parameters
Type | Name | Description |
---|---|---|
System.String | pkgId | Package ID. |
Returns
Type | Description |
---|---|
System.String[] | The widget id array. |
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 required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/widget.viewer
Feature: http://tizen.org/feature/shell.appwidget
Events
Declaration
C#Copypublic 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 required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Feature: http://tizen.org/feature/shell.appwidget
Declaration
C#Copypublic 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 required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Feature: http://tizen.org/feature/shell.appwidget
Declaration
C#Copypublic 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 required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Feature: http://tizen.org/feature/shell.appwidget
Declaration
C#Copypublic 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 required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |