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

    A jump link is a link from the jump list to an application. Jump links can be added at design time using a collection editor, or they may be added dynamically with code.

    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 C1JumpLink.
    3. Set the properties in the properties grid.

    In Code

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

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Dim c1JumpLink1 As New C1JumpLink()
    c1TaskbarButton1.JumpList.Items.Add(c1JumpLink1)
    

    To write code in C#

    C#
    Copy Code
    C1JumpLink c1JumpLink1 = new C1JumpLink();
    c1TaskbarButton1.JumpList.Items.Add(c1JumpLink1);
    

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

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Dim C1JumpLink1 As New C1JumpLink()
    Dim C1JumpLink2 As New C1JumpLink()
    C1TaskbarButton1.JumpList.Items.AddRange(New C1.Win.C1Win7Pack.C1JumpLink() {C1JumpLink1, C1JumpLink2})
    

    To write code in C#

    C#
    Copy Code
    C1JumpLink C1JumpLink1 = new C1JumpLink();
    C1JumpLink C1JumpLink2 = new C1JumpLink();
    c1TaskbarButton1.JumpList.Items.AddRange(new C1.Win.C1Win7Pack.C1JumpLink[] {
        C1JumpLink1,
        C1JumpLink2});