This documentation is archived and is not being maintained.

JumpTask Class

Represents a shortcut to an application in the Windows 7 taskbar Jump List.

Namespace:  System.Windows.Shell
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: Not mapped to an xmlns.

public class JumpTask : JumpItem

The JumpTask type exposes the following members.

Public methodJumpTaskInitializes a new instance of the JumpTask class.

Public propertyApplicationPathGets or sets the path to the application.
Public propertyArgumentsGets or sets the arguments passed to the application on startup.
Public propertyCustomCategoryGets or sets the name of the category the JumpItem is grouped with in the Windows 7 taskbar Jump List. (Inherited from JumpItem.)
Public propertyDescriptionGets or sets the text displayed in the tooltip for the task in the Jump List.
Public propertyIconResourceIndexGets or sets the zero-based index of an icon embedded in a resource.
Public propertyIconResourcePathGets or sets the path to a resource that contains the icon to display in the Jump List.
Public propertyTitleGets or sets the text displayed for the task in the Jump List.
Public propertyWorkingDirectoryGets or sets the working directory of the application on startup.

Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

A JumpTask can be thought of as a shortcut to an application. You specify the path to the executable file by setting the ApplicationPath property. If the ApplicationPath is not set, the path of the current running process is implied. You can optionally specify Arguments to pass to the application at startup.

You can set basic display properties, such as Title, Description, and IconResourcePath to specify the appearance of the task in the Jump List. An icon used with a JumpTask must be available as a native resource. If multiple icon resources are available in a DLL or executable file, you specify the one to use by indicating an offset in the IconResourceIndex property.

By default, a JumpTask will be placed in the Tasks category of the Jump List. You can specify custom grouping of tasks by setting the CustomCategory property.

You can visually separate items in a Jump List by creating a JumpTask that does not have a Title and CustomCategory specified. This empty JumpTask will be displayed as a horizontal line in the Jump List. In this case, other properties can be set, but they will not have any effect.

The following example shows how to declare a JumpTask in markup. The JumpTask opens a text file named readme.txt in the Notepad application.

<JumpTask Title="Read Me" 
          Description="Open readme.txt in Notepad." 

The following example shows how to configure a JumpTask in code. The JumpTask opens the Calculator application.

// 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";

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.