Share via


IWidgetProvider.DeleteWidget(String, String) Method

Definition

Notifies the widget provider that one of the widgets it supports has been deleted, for example, when a user removes a widget from a widget host.

public:
 void DeleteWidget(Platform::String ^ widgetId, Platform::String ^ customState);
void DeleteWidget(winrt::hstring const& widgetId, winrt::hstring const& customState);
public void DeleteWidget(string widgetId, string customState);
function deleteWidget(widgetId, customState)
Public Sub DeleteWidget (widgetId As String, customState As String)

Parameters

widgetId
String

Platform::String

winrt::hstring

The unique identifier of the widget that is being unpinned. The widget ID value is dynamically generated by the WidgetManager. The widget ID remains the same for a widget from the moment of its creation until the moment the Widget is deleted. The widget ID is a unique value across all widgets and all widget providers.

customState
String

Platform::String

winrt::hstring

A string containing the custom state of the widget that has been unpinned.

Remarks

As soon as this method has been called for a specific widget ID, your provider will not receive any other requests for that widget. At the time this method is called, using the deleted widget's Id to make any further calls on the methods of the WidgetManager will have no effect.

Applies to