ComponentOne Windows 7 Control Pack for WinForms
Windows 7 Control Pack for WinForms Task-Based Help / C1TaskbarButton Task-Based Help / Working with the Jump List / Adding Jump Tasks
In This Topic
    Adding Jump Tasks
    In This Topic

    A jump task is a link from the taskbar's jump list to an application. A jump task can be added to the jump list at design time through a collection editor or dynamically at run time.

    In the Designer

    Complete the following steps:

    1. Open the C1JumpList.Tasks Collection Editor in one of the following ways:
      • Click the C1TaskbarButtons smart tag to open the C1TaskbarButton Tasks Menu and select Edit Jump Tasks.

        OR

      • In the Properties window, expand the JumpList node and then, next to Tasks, click the ellipses button.
    2. In the C1JumpList.Tasks Collection Editor, click Add to add a jump task. You can set the task's properties in the properties grid.

    In Code

    The following code creates one C1JumpTask and adds it to the jump list.

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Dim c1JumpTask1 As New C1JumpTask()
    c1TaskbarButton1.JumpList.Tasks.Add(c1JumpTask1)
    

    To write code in C#

    C#
    Copy Code
    C1JumpTask c1JumpTask1 = new C1JumpTask();
    c1TaskbarButton1.JumpList.Tasks.Add(c1JumpTask1);
    

    If you'd like to add a range of C1JumpTasks to the jump list, you can use the AddRange method instead, like this:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Dim C1JumpTask1 As New C1JumpTask()
    Dim C1JumpTask2 As New C1JumpTask()
    C1TaskbarButton1.JumpList.Tasks.AddRange(New C1.Win.C1Win7Pack.C1JumpTask() {C1JumpTask1, C1JumpTask2})
    

    To write code in C#

    C#
    Copy Code
    C1JumpTask c1JumpTask1 = new C1JumpTask();
    C1JumpTask c1JumpTask2 = new C1JumpTask();
    c1TaskbarButton1.JumpList.Tasks.AddRange(new C1.Win.C1Win7Pack.C1JumpTask[]{c1JumpTask1, c1JumpTask2});