แก้ไข

แชร์ผ่าน


JumpList.JumpItemsRemovedByUser Event

Definition

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 Custom Event JumpItemsRemovedByUser As EventHandler(Of JumpItemsRemovedEventArgs) 
Public Event JumpItemsRemovedByUser As EventHandler(Of JumpItemsRemovedEventArgs) 

Event Type

Examples

The following example shows how to handle the JumpItemsRemovedByUser event to display the rejected items in a message box. 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());
}

Remarks

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. You can access the lists of removed items through event handlers for the JumpItemsRejected and JumpItemsRemovedByUser events.

Applies to