Lenguaje

JumpList.SetJumpList(Application, JumpList) Método

Definición

Establece el JumpList objeto asociado a una aplicación.

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 a .JumpList

value
JumpList

que JumpList se va a asociar a la aplicación.

Ejemplos

En el ejemplo siguiente se muestra cómo crear un JumpList elemento en el código. Se llama al método estático SetJumpList para asociar con JumpList la aplicación actual. El JumpList se aplica automáticamente al shell de Windows cuando se establece. Este ejemplo forma parte de un ejemplo más grande disponible en la información general de la JumpList clase.

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 JumpList objetos. Sin embargo, solo JumpList una a la vez se puede asociar a .Application Llame al SetJumpList método para establecer el JumpList objeto asociado actualmente a .Application

Se aplica a