Share via


WidgetContext.Id Property

Definition

Gets the ID of the widget associated with the WidgetContext.

public:
 property Platform::String ^ Id { Platform::String ^ get(); };
winrt::hstring Id();
public string Id { get; }
var string = widgetContext.id;
Public ReadOnly Property Id As String

Property Value

String

Platform::String

winrt::hstring

The ID of the widget associated with the WidgetContext.

Remarks

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.

Applies to