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.

Restituisce

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 Apply metodo viene chiamato per applicare l'oggetto aggiornato JumpList alla shell di 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. .NET Framework non richiede che si tratta dell'oggetto JumpList attualmente applicato alla shell di Windows.

Si applica a