WidgetInfo 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
包含小工具的狀態資訊,包括視覺範本、資料範本、自訂狀態、最後更新時間,以及來自小工具主機的上下文資訊。
public ref class WidgetInfo sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.Widgets.WidgetContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class WidgetInfo final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.Widgets.WidgetContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class WidgetInfo
Public NotInheritable Class WidgetInfo
- 繼承
- 屬性
備註
呼叫 Microsoft.Windows 來取得此類別的實例。Widgets.Providers.WidgetManager.GetWidgetInfo 或 Microsoft.Windows。Widgets.Providers.WidgetManager.GetWidgetInfos.
屬性
| 名稱 | Description |
|---|---|
| CustomState |
會取得包含該小工具目前 Adaptive Card JSON 資料範本的字串。 |
| Data |
會取得包含該小工具目前 Adaptive Card JSON 資料範本的字串。 |
| IsPlaceholderContent |
會獲得一個值,表示更新內容是否為佔位內容。 |
| LastUpdateTime |
它會顯示該小工具最後更新的時間。 |
| Rank |
會取得一個值,表示該元件相對於同一套件身份的其他元件的排名。 |
| Template |
會取得一個包含目前 Adaptive Card JSON 視覺範本的字串。 |
| WidgetContext |
取得一個 WidgetContext 物件,包含關於 widget 主機內 widget 設定的資訊。 |