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 JumpPaths
In This Topic
    Adding JumpPaths
    In This Topic

    Jump paths are links from the jump list to a specified file. Please note that your application has to have the file type of this link registered, otherwise Jump Paths will simply not appear on the jump list.

    In the Designer

    Complete the following steps:

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

        OR

      • In the Properties window, expand the JumpList node and then, next to Items, click the ellipses button.
    2. In the C1JumpList.Items Collection Editor, open the Add drop-down list and select C1JumpPath.
    3. Set the properties in the properties grid. There are only two properties, CustomCategory and Path, available for a C1JumpPath.

    In Code

    The following code creates one C1JumpPath and adds it to the jump list:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Dim C1JumpPath1 As New C1JumpPath()
    C1TaskbarButton1.JumpList.Items.Add(C1JumpPath1)
    

    To write code in C#

    C#
    Copy Code
    C1JumpPath c1JumpPath1 = new C1JumpPath();
    c1TaskbarButton1.JumpList.Items.Add(c1JumpPath1);
    

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

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Dim C1JumpPath1 As New C1JumpPath()
    Dim C1JumpPath2 As New C1JumpPath()
    C1TaskbarButton1.JumpList.Items.AddRange(New C1.Win.C1Win7Pack.C1JumpPath() {C1JumpPath1, C1JumpPath2})
    

    To write code in C#

    C#
    Copy Code
    C1JumpPath C1JumpPath1 = new C1JumpPath();C1JumpPath C1JumpPath2 = new C1JumpPath();
    c1TaskbarButton1.JumpList.Items.AddRange(new C1.Win.C1Win7Pack.C1JumpPath[] {
        C1JumpPath1,
        C1JumpPath2});