# Adding a OutPage to the OutBar

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

## Content



To programmatically add a new **C1OutPage** to the **C1OutBar**, complete the following steps:

1.  Add the [C1OutBar](/componentone/docs/win/online-menus-toolbar/) control to the form.
2.  Import the **C1.Win.C1Command** namespace. The code below imports the **C1.Win.C1Command** namespace.
    
    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
    
3.  Add a new [C1OutPage](/componentone/docs/win/online-menus-toolbar/) to the [C1OutBar](/componentone/docs/win/online-menus-toolbar/). The last line of code uses the **Add** method to add the new outpage1 to the **C1OutBar1**. Enter the following code within the **Form\_Load** event:
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in Visual Basic
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```vbnet
    Dim outpage1 As New C1.Win.C1Command.C1OutPage()
    Outpage1.Text = "New Page"
    Me.c1OutBar1.Pages.Add(outpage1)
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in C#
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```csharp
    C1.Win.C1Command.C1OutPage outpage1 = new C1.Win.C1Command.C1OutPage();
    outpage1.Text = "New Page";
    this.c1OutBar1.Pages.Add(outpage1);
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
4.  Build and run the new page you created for [C1OutBar](/componentone/docs/win/online-menus-toolbar/). The new out page appears like the following image.<br />![Outpage](https://cdn.mescius.io/document-site-files/images/a27cb622-e6d9-4efc-a0b0-0c31245fd632/imagesext/image10_59.png)

## See Also

[Adding Multiple OutPages to OutBar](/componentone/docs/win/online-menus-toolbar/menusandtoolbarsforw2/outbartasks/addingmultiplec1outp)