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.
public class WidgetControl : IDisposable
- Inheritance
-
WidgetControl
- Implements
Constructors
View SourceWidgetControl(String)
The constructor of the WidgetControl object.
Declaration
public WidgetControl(string widgetId)
Parameters
Type | Name | Description |
---|---|---|
String | widgetId | Widget ID. |
API Level: 3
Properties
View SourceId
The widget ID.
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
String |
API Level: 3
View SourceIsNoDisplay
The flag value for "nodisplay".
Declaration
public 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. |
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
View SourceMainAppId
Gets main appid of the widget.
Declaration
public string MainAppId { get; }
Property Value
Type | Description |
---|---|
String |
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
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
View SourcePackageId
Gets package ID of the widget.
Declaration
public string PackageId { get; }
Property Value
Type | Description |
---|---|
String |
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
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
View SourceSetupAppId
Gets setup app ID of the widget.
Declaration
public string SetupAppId { get; }
Property Value
Type | Description |
---|---|
String |
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
NotSupportedException | Thrown when the required features are not supported. |
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
View SourceCreateAll(String)
Factory method for the WidgetControl. It will create all the objects of WidgetControl based on the package ID.
Declaration
public static WidgetControl[] CreateAll(string pkgId)
Parameters
Type | Name | Description |
---|---|---|
String | pkgId | Package ID. |
Returns
Type | Description |
---|---|
WidgetControl[] | The widget control array. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown when failed because of an invalid argument. |
InvalidOperationException | Thrown in case of failed conditions. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
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
View SourceDispose()
Releases all the resources used by the WidgetControl class.
Declaration
public void Dispose()
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown in case of failed conditions. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Feature: http://tizen.org/feature/shell.appwidget
View SourceFinalize()
Finalizer of the WidgetControl class.
Declaration
protected void Finalize()
GetIconPath(String)
Gets the widget icon path.
Declaration
public string GetIconPath(string lang)
Parameters
Type | Name | Description |
---|---|---|
String | lang | Language. |
Returns
Type | Description |
---|---|
String | The widget icon path. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the argument is null. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
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
View SourceGetInstances()
Gets the objects for widget instance information.
Declaration
public IEnumerable<WidgetControl.Instance> GetInstances()
Returns
Type | Description |
---|---|
IEnumerable<WidgetControl.Instance> | The instances list. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown in case of failed conditions. |
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
View SourceGetName(String)
Gets the widget name.
Declaration
public string GetName(string lang)
Parameters
Type | Name | Description |
---|---|---|
String | lang | Language. |
Returns
Type | Description |
---|---|
String | The widget name. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the argument is null. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
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
View SourceGetScales()
Gets the objects for widget scale information.
Declaration
public IEnumerable<WidgetControl.Scale> GetScales()
Returns
Type | Description |
---|---|
IEnumerable<WidgetControl.Scale> | The scales list. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown in case of failed conditions. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
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
View SourceGetWidgetIds(String)
Gets all the widget IDs by the package ID.
Declaration
public static string[] GetWidgetIds(string pkgId)
Parameters
Type | Name | Description |
---|---|---|
String | pkgId | Package ID. |
Returns
Type | Description |
---|---|
String[] | The widget id array. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown when failed because of an invalid argument. |
InvalidOperationException | Thrown in case of failed conditions. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
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
View SourceCreated
The event handler for a created widget instance.
Declaration
public event EventHandler<WidgetLifecycleEventArgs> Created
Event Type
Type | Description |
---|---|
EventHandler<WidgetLifecycleEventArgs> |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown in case of failed conditions. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Feature: http://tizen.org/feature/shell.appwidget
View SourceDestroyed
The event handler for a destroyed widget instance.
Declaration
public event EventHandler<WidgetLifecycleEventArgs> Destroyed
Event Type
Type | Description |
---|---|
EventHandler<WidgetLifecycleEventArgs> |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown in case of failed conditions. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Feature: http://tizen.org/feature/shell.appwidget
View SourcePaused
The event handler for a paused widget instance.
Declaration
public event EventHandler<WidgetLifecycleEventArgs> Paused
Event Type
Type | Description |
---|---|
EventHandler<WidgetLifecycleEventArgs> |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown in case of failed conditions. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
NotSupportedException | Thrown when the required features are not supported. |
API Level: 3
Feature: http://tizen.org/feature/shell.appwidget
View SourceResumed
The event handler for a resumed widget instance.
Declaration
public event EventHandler<WidgetLifecycleEventArgs> Resumed
Event Type
Type | Description |
---|---|
EventHandler<WidgetLifecycleEventArgs> |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown in case of failed conditions. |
UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
NotSupportedException | Thrown when the required features are not supported. |