Export (0) Print
Expand All

JumpList.SetJumpList Method

Sets the JumpList object associated with an application.

Namespace:  System.Windows.Shell
Assembly:  PresentationFramework (in PresentationFramework.dll)

[UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.AllWindows)]
public static void SetJumpList(
	Application application,
	JumpList value
)

Parameters

application
Type: System.Windows.Application

The application associated with the JumpList.

value
Type: System.Windows.Shell.JumpList

The JumpList to associate with the application.

You can create multiple JumpList objects. However, only one JumpList at a time can be associated with an Application. Call the SetJumpList method to set the JumpList currently associated with an Application.

The following example shows how to create a JumpList in code. The static SetJumpList method is called to associate the JumpList with the current application. The JumpList is automatically applied to the Windows shell when it is set. 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);
}

.NET Framework

Supported in: 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft