Lingua

JumpList.GetJumpList(Application) Metodo

Definizione

Restituisce l'oggetto JumpList associato a un'applicazione.

public:
 static System::Windows::Shell::JumpList ^ GetJumpList(System::Windows::Application ^ application);
public static System.Windows.Shell.JumpList GetJumpList(System.Windows.Application application);
static member GetJumpList : System.Windows.Application -> System.Windows.Shell.JumpList
Public Shared Function GetJumpList (application As Application) As JumpList

Parametri

application
Application

Applicazione associata all'oggetto JumpList.

Valori restituiti

Oggetto JumpList associato all'applicazione specificata.

Esempio

Nell'esempio seguente viene illustrato come ottenere l'oggetto JumpList associato all'applicazione corrente. Un JumpTask oggetto viene aggiunto alla JumpItems raccolta e aggiunto alla categoria Recenti . Il metodo /> aggiornata alla shell Windows. Questo esempio fa parte di un esempio più ampio disponibile nella panoramica della JumpList classe.

private void AddTask(object sender, RoutedEventArgs e)
{
    // Configure a new JumpTask.
    JumpTask jumpTask1 = new JumpTask();
    // Get the path to Calculator and set the JumpTask properties.
    jumpTask1.ApplicationPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "calc.exe");
    jumpTask1.IconResourcePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "calc.exe");
    jumpTask1.Title = "Calculator";
    jumpTask1.Description = "Open Calculator.";
    jumpTask1.CustomCategory = "User Added Tasks";
    // Get the JumpList from the application and update it.
    JumpList jumpList1 = JumpList.GetJumpList(App.Current);
    jumpList1.JumpItems.Add(jumpTask1);
    JumpList.AddToRecentCategory(jumpTask1);
    jumpList1.Apply();
}

Commenti

È possibile chiamare il GetJumpList metodo per ottenere l'oggetto JumpList attualmente associato a un oggetto Application. Il framework di .NET non richiede che si tratta della JumpList attualmente applicata alla shell Windows.

Si applica a