WidgetUpdateRequestOptions Class

Definition

public ref class WidgetUpdateRequestOptions sealed
/// [Windows.Foundation.Metadata.Activatable(Microsoft.Windows.Widgets.Providers.IWidgetUpdateRequestOptionsFactory, 65536, "Microsoft.Windows.Widgets.WidgetContract")]
/// [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 WidgetUpdateRequestOptions final
[Windows.Foundation.Metadata.Activatable(typeof(Microsoft.Windows.Widgets.Providers.IWidgetUpdateRequestOptionsFactory), 65536, "Microsoft.Windows.Widgets.WidgetContract")]
[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 WidgetUpdateRequestOptions
function WidgetUpdateRequestOptions(widgetId)
Public NotInheritable Class WidgetUpdateRequestOptions
Inheritance
Object Platform::Object IInspectable WidgetUpdateRequestOptions
Attributes

Remarks

Any variable not set in the WidgetUpdateRequestOptions class will not be updated. For example, if you are only interested in updating the widget's data but you want to keep the existing visual template and custom state, then by setting only the WidgetUpdateRequestOptions.Data property, the widget's data will be updated but the template and custom state will not be modified.

UpdateWidget can also be used to clear any stored value by setting an empty string for the value to be cleared. For example, if you want to clear the widget's stored custom state you can set the WidgetUpdateRequestOptions.CustomState property to an empty string, which will erase the stored custom state once UpdateWidget is called.

Constructors

WidgetUpdateRequestOptions(String)

Initializes a new instance of the WidgetRequestOptions class.

Properties

CustomState

Gets or sets a string representing the custom state for the associated widget.

Data

Gets or sets the Adaptive Card data template for the associated widget.

Template

Gets or sets the Adaptive Card visual template for the associated widget.

UnsetValue

Gets a sentinel value indicating that the associated property is unset.

WidgetId

Gets the widget ID of the widget to be updated.

Applies to