JumpList.JumpItemsRemovedByUser JumpList.JumpItemsRemovedByUser JumpList.JumpItemsRemovedByUser JumpList.JumpItemsRemovedByUser Event

定义

以前在跳转列表中的跳转项由用户从列表中删除时发生。Occurs when jump items previously in the Jump List are removed from the list by the user.

public:
 event EventHandler<System::Windows::Shell::JumpItemsRemovedEventArgs ^> ^ JumpItemsRemovedByUser;
public event EventHandler<System.Windows.Shell.JumpItemsRemovedEventArgs> JumpItemsRemovedByUser;
member this.JumpItemsRemovedByUser : EventHandler<System.Windows.Shell.JumpItemsRemovedEventArgs> 
Public Event JumpItemsRemovedByUser As EventHandler(Of JumpItemsRemovedEventArgs) 

示例

下面的示例演示如何处理JumpItemsRemovedByUser事件,以在消息框中显示被拒绝的项。The following example shows how to handle the JumpItemsRemovedByUser event to display the rejected items in a message box. 此示例摘自一个更大的示例中提供JumpList类概述。This example is part of a larger example available in the JumpList class overview.

private void JumpList_JumpItemsRemovedByUser(object sender, System.Windows.Shell.JumpItemsRemovedEventArgs e)
{
    StringBuilder sb = new StringBuilder();
    sb.AppendFormat("{0} Jump Items Removed by the user:\n", e.RemovedItems.Count);
    for (int i = 0; i < e.RemovedItems.Count; ++i)
    {
        sb.AppendFormat("{0}\n", e.RemovedItems[i]);
    }

    MessageBox.Show(sb.ToString());
}

注解

内容之后JumpList应用于 Windows shell 中,JumpItems属性修改为包含 Windows 外壳程序已成功添加到其跳转列表中的项目。After the contents of the JumpList are applied to the Windows shell, the JumpItems property is modified to contain only those items that the Windows shell successfully added to its Jump List. 您可以通过事件处理程序访问的已删除的项列表JumpItemsRejectedJumpItemsRemovedByUser事件。You can access the lists of removed items through event handlers for the JumpItemsRejected and JumpItemsRemovedByUser events.

适用于