JumpList.GetJumpList(Application) Methode

Definitie

Retourneert het JumpList object dat is gekoppeld aan een toepassing.

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

Parameters

application
Application

De toepassing die is gekoppeld aan de JumpList.

Retouren

Het JumpList object dat is gekoppeld aan de opgegeven toepassing.

Voorbeelden

In het volgende voorbeeld ziet u hoe u de JumpList gekoppelde aan de huidige toepassing kunt ophalen. Een JumpTask wordt toegevoegd aan de JumpItems verzameling en toegevoegd aan de categorie Recent . De methode Apply wordt aangeroepen om de bijgewerkte JumpList toe te passen op de Windows shell. Dit voorbeeld maakt deel uit van een groter voorbeeld dat beschikbaar is in het JumpList klassenoverzicht.

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();
}

Opmerkingen

U kunt de GetJumpList methode aanroepen om de JumpList momenteel gekoppelde aan een Application. Het .NET Framework vereist niet dat dit de JumpList is die momenteel wordt toegepast op de Windows-shell.

Van toepassing op