JumpList.Apply 方法

定義

將目前狀態中的 JumpList 傳送至 Windows Shell。

public:
 void Apply();
[System.Security.SecurityCritical]
public void Apply ();
public void Apply ();
[<System.Security.SecurityCritical>]
member this.Apply : unit -> unit
member this.Apply : unit -> unit
Public Sub Apply ()
屬性

例外狀況

JumpList 未完全初始化。

範例

下列範例示範如何取得目前 JumpList 和清除集合的內容 JumpItems 。 接著會 Apply 呼叫 方法, JumpList 將變更套用至 Windows 殼層。 此範例是類別概觀中較大範例的 JumpList 一部分。

private void ClearJumpList(object sender, RoutedEventArgs e)
{
    JumpList jumpList1 = JumpList.GetJumpList(App.Current);
    jumpList1.JumpItems.Clear();
    jumpList1.Apply();
}

備註

方法 Apply 會以目前狀態將 的內容 JumpList 傳送至 Windows 殼層。 完成此呼叫之後, JumpItems 屬性會修改為只包含 Windows 殼層成功新增至工作列快捷方式清單的專案。 您可以透過 和 JumpItemsRemovedByUser 事件的事件處理常式 JumpItemsRejected 來存取已移除的專案清單。

適用於