JumpList.GetJumpList(Application) Método

Definición

Devuelve el objeto JumpList asociado a una aplicación.

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

Parámetros

application
Application

Aplicación asociada al objeto JumpList.

Devoluciones

Objeto JumpList asociado a la aplicación especificada.

Ejemplos

En el ejemplo siguiente se muestra cómo obtener el JumpList asociado a la aplicación actual. JumpTask Se agrega a la JumpItems colección y se agrega a la categoría Recent. Apply Se llama al método para aplicar el actualizado JumpList al shell de Windows. Este ejemplo forma parte de un ejemplo más grande disponible en la información general de la JumpList clase.

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

Comentarios

Puede llamar al GetJumpList método para obtener el JumpList objeto asociado actualmente a .Application .NET Framework no requiere que sea el JumpList que se aplica actualmente al shell de Windows.

Se aplica a