Share via


WidgetManager Class

Definition

Provides methods for querying, updating, and deleting widgets.

public ref class WidgetManager sealed : IWidgetManager
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.Widgets.WidgetContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class WidgetManager final : IWidgetManager
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.Widgets.WidgetContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class WidgetManager : IWidgetManager
Public NotInheritable Class WidgetManager
Implements IWidgetManager
Inheritance
Object Platform::Object IInspectable WidgetManager
Attributes
Implements

Remarks

This class can only perform operations on existing widgets.

Get an instance of this class by calling GetDefault.

Methods

DeleteWidget(String)

Requests the removal of a widget from the widget host.

GetDefault()

Gets an instance of the WidgetManager class.

GetWidgetIds()

Gets all of the widget IDs for widgets associated with the calling provider app.

GetWidgetInfo(String)

Gets a WidgetInfo object containing information about the widget with the provided widget ID, including the visual template, data template, custom state, the last update time, and context information from the widget host.

GetWidgetInfos()

Gets the stored information for all widgets associated with the calling app.

UpdateWidget(WidgetUpdateRequestOptions)

Provides updated content for a widget to the widget host.

Applies to