JumpList.SetJumpList(Application, JumpList) Método

Definición

Establece el objeto JumpList asociado a una aplicación.Sets the JumpList object associated with an application.

public:
 static void SetJumpList(System::Windows::Application ^ application, System::Windows::Shell::JumpList ^ value);
public static void SetJumpList (System.Windows.Application application, System.Windows.Shell.JumpList value);
static member SetJumpList : System.Windows.Application * System.Windows.Shell.JumpList -> unit
Public Shared Sub SetJumpList (application As Application, value As JumpList)

Parámetros

application
Application

Aplicación asociada al objeto JumpList.The application associated with the JumpList.

value
JumpList

JumpList que se va a asociar a la aplicación.The JumpList to associate with the application.

Ejemplos

En el ejemplo siguiente se muestra cómo crear un JumpList en el código.The following example shows how to create a JumpList in code. Se llama al método estático SetJumpList para asociar el JumpList a la aplicación actual.The static SetJumpList method is called to associate the JumpList with the current application. El JumpList se aplica automáticamente al shell de Windows cuando se establece.The JumpList is automatically applied to the Windows shell when it is set. Este ejemplo forma parte de un ejemplo más grande disponible en la información general de la clase JumpList.This example is part of a larger example available in the JumpList class overview.

private void SetNewJumpList(object sender, RoutedEventArgs e)
{
    //Configure a new JumpTask
    JumpTask jumpTask1 = new JumpTask();
    // Get the path to WordPad and set the JumpTask properties.
    jumpTask1.ApplicationPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "write.exe");
    jumpTask1.IconResourcePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "write.exe");
    jumpTask1.Title = "WordPad";
    jumpTask1.Description = "Open WordPad.";
    jumpTask1.CustomCategory = "Jump List 2";
    // Create and set the new JumpList.
    JumpList jumpList2 = new JumpList();
    jumpList2.JumpItems.Add(jumpTask1);
    JumpList.SetJumpList(App.Current, jumpList2);
}

Comentarios

Puede crear varios objetos JumpList.You can create multiple JumpList objects. Sin embargo, solo se puede asociar una JumpList a la vez a una Application.However, only one JumpList at a time can be associated with an Application. Llame al método SetJumpList para establecer el JumpList asociado actualmente a un Application.Call the SetJumpList method to set the JumpList currently associated with an Application.

Se aplica a