Share via


JumpList.ShowRecentCategory 屬性

定義

取得或設定值,這個值指出是否在跳躍清單中顯示最近使用的項目。

public:
 property bool ShowRecentCategory { bool get(); void set(bool value); };
public bool ShowRecentCategory { get; set; }
public bool ShowRecentCategory { [System.Security.SecurityCritical] get; [System.Security.SecurityCritical] set; }
member this.ShowRecentCategory : bool with get, set
[<get: System.Security.SecurityCritical>]
[<set: System.Security.SecurityCritical>]
member this.ShowRecentCategory : bool with get, set
Public Property ShowRecentCategory As Boolean

屬性值

如果在跳躍清單中顯示最近使用的項目則為 true,否則為 false。 預設為 false

屬性

範例

下列範例顯示 JumpList 設定為顯示 [最近] 分類的 。 此範例是類別概觀中較大範例的 JumpList 一部分。

<JumpList ShowRecentCategory="True"
          ShowFrequentCategory="True"
          JumpItemsRejected="JumpList_JumpItemsRejected"
          JumpItemsRemovedByUser="JumpList_JumpItemsRemovedByUser">

備註

[最近]類別的內容是由 Windows 殼層管理。 若要在跳躍清單中顯示常用專案,請將 ShowRecentCategory 屬性設定為 true

[最近] 和 [頻繁] 類別通常包含許多相同的跳躍專案。 因此,應用程式通常會在跳躍清單中顯示 [最近] 或 [ 常用 ] 類別,但不會同時顯示兩者。

您可以呼叫 AddToRecentCategory 方法來要求 Windows 殼層將專案新增至 [最近 使用的專案] 清單。 如果您的應用程式未註冊以處理專案的檔案名類型,它不會出現在 [最近 ] 清單中,而且對 AddToRecentCategory 的呼叫會以無訊息方式失敗。

適用於