# Adding Control Bar Element

The following topic shows how to add the ControlBar to your project:

## Content

The following topic shows how to add the ControlBar to your project:

1. Add a **UserControl** to the project. In the Solution Explorer, right-click the solution name and select **Add\| User Control**. Name the user control (MyControlBar1)
2. Click **Add** in the **Add New Item** dialog box.
3. Add two Standard Buttons, **Button1** and **Button2** to **MyControlBar1**.
4. Add the **C1ZoomCommandProvider** from the Toolbox. If it does not appear in the Toolbox, right-click the Toolbox and select **Add Tab**. Name the tab TouchToolKit and right-click the area in the tab and select **Choose Items**. Browse to the location of the **C1.Win.C1TouchToolKit.x.dll** and click **Open**. The **C1ZoomCommandProvider1** item will appear in the component tray.
5. Click the smart-tag anchor of Button1, then select **ZoomIn** from the list of **C1ZoomCommands**. Note: The **C1.Win.C1TouchToolKit.x.Design** should be referenced to your project for the smart-tag anchor to appear when you clikc on the control.

![ adding controbar](https://cdn.mescius.io/document-site-files/images/b72f799f-5669-44a4-8119-5f3343d59999/images/addingcontrolbar.png)

6. Repeat same step for **Button2**, and select **ZoomOut** from the list.
7. Set **Button1’s** **Text** to **Zoom In** and **Button2’s** **Text** to **Zoom Out**.
8. Build the project.
9. In design-time, add a **C1Zoom** to the Form. (C1Zoom1).
10. Select **C1Zoom1** from the **Properties Window** and click on the ellipsis button next to the **ControlBars** property in the Properties Window.

The **ControlBar Collection Editor** appears:

![control bar collection editor](https://cdn.mescius.io/document-site-files/images/b72f799f-5669-44a4-8119-5f3343d59999/images/controlbarcollectioneditor.png)

11. Click **Add** in the **ControlBar Collection Editor** window.
12. Click on the dropdown arrow next to the **Content** property and select **WindowsForms1.MyControlBar1**.
13. Click **OK** to save and close the **ControlBar Collection Editor**.
14. Add a Standard control such as a **Button** to Form1.
15. Run the project, and click on the **Zoom In** button to zoom in on the **Button** control and click on the **Zoom Out** button to zoom out on the button control.

Notice the **button1** control will appear larger each time you click on the Zoom In button and then gradually zoom out each time you click on the Zoom Out button.

![](https://cdn.mescius.io/document-site-files/images/b72f799f-5669-44a4-8119-5f3343d59999/images/zoominzoomoutresult.png)