# Creating a Collapsed Topic Page

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

## Content



By default, a page added to the [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) control will be expanded. You can create a collapsed page by setting the [Collapsed](/componentone/docs/win/online-menus-toolbar/) property to **True**. In this topic, you will learn how to set the [Collapsed](/componentone/docs/win/online-menus-toolbar/) property using the floating toolbar, the collection editor and code.

### 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 **Page1** (or another page of your choice) 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 **Edit topic page appearance** button ![](https://cdn.mescius.io/document-site-files/images/a27cb622-e6d9-4efc-a0b0-0c31245fd632/imagesext/image10_76.png) to open the **C1TopicPage Properties** editor.
4.  Select the **Collapsed** check box and observe that the page is now collapsed.

### 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. 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 (![icon](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 the page you wish to have collapsed.
5.  In the Properties grid, set the [Collapsed](/componentone/docs/win/online-menus-toolbar/) property to **True**.
6.  Press **OK** to close the **C1TopicPage Collection Editor** and observe that the topic page is collapsed.

### In 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 (![icon](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 the page you wish to have collapsed.
5.  In the Properties grid, set the **Tag** property to “PageToCollapse”. This tag is a unique indicator that will allow you to find the appropriate page in code using the [FindPageByTag](/componentone/docs/win/online-menus-toolbar/) method.
6.  Click **OK** to close the **C1TopicPage Collection Editor**.
7.  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.
8.  Add the following code to the **Form\_Load** event. This code will find the page, assign it to a variable, and then set the page's [Collapsed](/componentone/docs/win/online-menus-toolbar/) property to **True**.
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in Visual Basic
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```vbnet
    Dim c1TopicPage1 = c1TopicBar1.FindPageByTag("PageToCollapse")
    c1TopicPage1.Collapsed = True
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in C#
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```csharp
    var c1TopicPage1 = c1TopicBar1.FindPageByTag("PageToCollapse");
    c1TopicPage1.Collapsed = true;
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
9.  Press F5 to build the project.

## See Also

[Using Topic Bar ToolTips](/componentone/docs/win/online-menus-toolbar/menusandtoolbarsforw2/topicbartasks/usingtopicbartooltip)