JumpList.Apply 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
以 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 完全初始化。
示例
以下示例演示如何获取集合的JumpItems当前JumpList和清除内容。 Apply然后调用该方法以将JumpList更改应用到 Windows shell。 此示例是类概述中提供的大型示例的 JumpList 一部分。
private void ClearJumpList(object sender, RoutedEventArgs e)
{
JumpList jumpList1 = JumpList.GetJumpList(App.Current);
jumpList1.JumpItems.Clear();
jumpList1.Apply();
}
注解
该方法 Apply 以当前状态将 Windows shell 的内容 JumpList 发送到 Windows shell。 完成此调用后,该 JumpItems 属性将修改为仅包含 Windows shell 已成功添加到其任务栏跳转列表的那些项。 可以通过事件处理程序 JumpItemsRejected 访问已删除项的列表以及 JumpItemsRemovedByUser 事件。