# Adding Topic Links to Topic Pages

Get started with Menus and Toolbars for WinForms. Create versatile menus and docking/floating toolbars. See more in documentation here.

## Content



There are three ways to add topic links to the topic pages: you can use the floating toolbar, the collection editor, or code. In this topic, you will learn how to add links to topic pages using each of these three methods.

### Using the Floating Toolbar

Complete the following steps:

1.  Navigate to the Toolbox and double-click the [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) icon. The [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) control is added to the form. Observe that one page, named **Page 1**, appears on the control by default. If you'd like to add more pages to the control, see [Adding Topic Pages to the TopicBar](/componentone/docs/win/online-menus-toolbar/menusandtoolbarsforw2/topicbartasks/addingandremovingtop/addingtopicpagestoth).
2.  Hover over **Page 1** with your cursor until the floating toolbar appears. The topic page's toolbar appears as follows:<br />![Floating toolbar](https://cdn.mescius.io/document-site-files/images/a27cb622-e6d9-4efc-a0b0-0c31245fd632/imagesext/image10_69.png)
3.  Click the **Add topic link** button<br />![Button](https://cdn.mescius.io/document-site-files/images/a27cb622-e6d9-4efc-a0b0-0c31245fd632/imagesext/image10_71.png).

The topic link, **Link 1**, is added to the topic page.

### Using the Collection Editor

Complete the following steps:

1.  Navigate to the Toolbox and double-click the [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) icon. The [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) control is added to the form. Observe that one page, named **Page 1**, appears on the control by default.
2.  Click [C1TopicBar](/componentone/docs/win/online-menus-toolbar/)'s smart tag (![Smart tag](https://cdn.mescius.io/document-site-files/images/a27cb622-e6d9-4efc-a0b0-0c31245fd632/imagesext/image10_47.png)) to open the **C1TopicBar Tasks** menu.
3.  On the **C1TopicBar Tasks** menu, click **Edit Pages**.<br />![Edit Pages](https://cdn.mescius.io/document-site-files/images/a27cb622-e6d9-4efc-a0b0-0c31245fd632/imagesext/image10_67.png)<br />The **C1TopicPage Collection Editor** opens.
4.  In the Members pane, select a page.
5.  In the Properties grid, locate the **Links** property and click the ellipsis button ![Ellipsis button](https://cdn.mescius.io/document-site-files/images/a27cb622-e6d9-4efc-a0b0-0c31245fd632/imagesext/image10_57.png). The **C1TopicLink Collection Editor** opens.
6.  Click **Add** to add a topic link to the topic page.
7.  Click **Close** to close the **C1TopicLink Collection Editor**.
8.  Click **Close** to close the **C1TopicPage Collection Editor**.

The topic link, **Link 1**, is added to the topic page.

### Using Code

Complete the following steps:

1.  Navigate to the Toolbox and double-click the [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) icon. The [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) control is added to the form. Observe that one page, named **Page 1**, appears on the control by default. If you'd like to add more pages to the control, see [Adding Topic Pages to the TopicBar](/componentone/docs/win/online-menus-toolbar/menusandtoolbarsforw2/topicbartasks/addingandremovingtop/addingtopicpagestoth).
2.  Click [C1TopicBar](/componentone/docs/win/online-menus-toolbar/)'s smart tag (![](https://cdn.mescius.io/document-site-files/images/a27cb622-e6d9-4efc-a0b0-0c31245fd632/imagesext/image10_47.png)) to open the **C1TopicBar Tasks** menu.
3.  On the **C1TopicBar Tasks** menu, click **Edit Pages**.<br />![Edit Pages](https://cdn.mescius.io/document-site-files/images/a27cb622-e6d9-4efc-a0b0-0c31245fd632/imagesext/image10_67.png)<br />The **C1TopicPage Collection Editor** opens.
4.  Select the page you wish to remove and then set its **Tag** property to “Tag1”. Adding this tag gives the page a unique indicator that will allow you to find it later using the [FindPageByTag](/componentone/docs/win/online-menus-toolbar/) method.
5.  Click **OK** to close the **C1TopicPage Collection Editor**.
6.  Double-click the empty portion of the form to open Code view. Notice that a **Form\_Load** event handler has been added to Code view.
7.  Import the following namespace into the project:
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in Visual Basic
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```vbnet
    Imports C1.Win.C1Command
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in C#
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```csharp
    using C1.Win.C1Command;
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
8.  Add the following code to the **Form\_Load** event. This code will find the page and assign it to a variable, create a new topic link object, and then add the topic link object to the topic page.
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in Visual Basic
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```vbnet
    'Find the topic page and assign it to a variable
    Dim c1TopicPage1 = c1TopicBar1.FindPageByTag("Tag1")
    'Create a new topic link and assign it a name
    Dim c1TopicLink1As New C1TopicLink("Link 1")
    'Add the new topic link to the topic page
    c1TopicPage1.Links.Add(c1TopicLink1)
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in C#
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```csharp
    //Find the topic page and assign it to a variable
    var c1TopicPage1 = c1TopicBar1.FindPageByTag("Tag1");
    //Create a new topic link and assign it a name
    C1TopicLink c1TopicLink1 = new C1TopicLink("Link 1");
    //Add the new topic link to the topic page
    c1TopicPage1.Links.Add(c1TopicLink1);  
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
9.  Press F5 to build the project and observe that the link has been added to the page.

### This topic illustrates the following:

In this topic, you learned how to add topic links to topic pages using three different methods. The result of this topic will look as follows:

<br />![Output](https://cdn.mescius.io/document-site-files/images/a27cb622-e6d9-4efc-a0b0-0c31245fd632/imagesext/image10_72.png)

## See Also

[Removing Topic Links from Topic Pages](/componentone/docs/win/online-menus-toolbar/menusandtoolbarsforw2/topicbartasks/addingandremovingtop/removingtopiclinksfr)