JumpList.JumpItemsRejected Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when jump items are not successfully added to the Jump List by the Windows shell.
public:
event EventHandler<System::Windows::Shell::JumpItemsRejectedEventArgs ^> ^ JumpItemsRejected;
public event EventHandler<System.Windows.Shell.JumpItemsRejectedEventArgs> JumpItemsRejected;
member this.JumpItemsRejected : EventHandler<System.Windows.Shell.JumpItemsRejectedEventArgs>
Public Custom Event JumpItemsRejected As EventHandler(Of JumpItemsRejectedEventArgs)
Public Event JumpItemsRejected As EventHandler(Of JumpItemsRejectedEventArgs)
Event Type
Examples
The following example shows how to handle the JumpItemsRejected 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_JumpItemsRejected(object sender, System.Windows.Shell.JumpItemsRejectedEventArgs e)
{
StringBuilder sb = new StringBuilder();
sb.AppendFormat("{0} Jump Items Rejected:\n", e.RejectionReasons.Count);
for (int i = 0; i < e.RejectionReasons.Count; ++i)
{
if (e.RejectedItems[i].GetType() == typeof(JumpPath))
sb.AppendFormat("Reason: {0}\tItem: {1}\n", e.RejectionReasons[i], ((JumpPath)e.RejectedItems[i]).Path);
else
sb.AppendFormat("Reason: {0}\tItem: {1}\n", e.RejectionReasons[i], ((JumpTask)e.RejectedItems[i]).ApplicationPath);
}
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
Pripomienky
https://aka.ms/ContentUserFeedback.
Pripravujeme: V priebehu roka 2024 postupne zrušíme službu Problémy v službe GitHub ako mechanizmus pripomienok týkajúcich sa obsahu a nahradíme ju novým systémom pripomienok. Ďalšie informácie nájdete na stránke:Odoslať a zobraziť pripomienky pre