Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

WidgetContext Class

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

Name Description
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


Feedback

Was this page helpful?