Share via


WidgetContext Class

Definition

Provides information about the configuration of a widget within the widget host.

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

Remarks

Get an instance of this class by implementing the CreateWidget and OnWidgetContextChanged methods of the IWidgetProvider interface.

Properties

DefinitionId

Gets the identifier registered by the widget provider to categorize the widget.

Id

Gets the ID of the widget associated with the WidgetContext.

IsActive

Gets the activation state of the widget.

Size

Gets a value indicating the currently displayed size of the widget.

Applies to