# Adding a Background Image

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

## Content



You can add a background image to the [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) control using the [BackgroundImage](/componentone/docs/win/online-menus-toolbar/) property. In this topic, you will learn to set this property using the Properties window and code.

### Using the Properties Window

Complete the following steps:

1.  Navigate to the Toolbox and double-click the [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) icon to add the [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) control to your form.
2.  Right-click the [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) control to open its context menu and then select **Properties**. The Properties window opens with the [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) control's properties in focus.
3.  Locate the [BackgroundImage](/componentone/docs/win/online-menus-toolbar/) property and click its ellipsis button ![ellipsis icon](https://cdn.mescius.io/document-site-files/images/a27cb622-e6d9-4efc-a0b0-0c31245fd632/imagesext/image10_57.png) to open the **Select Resource** dialog box.
4.  Select the **Local resource** radio button and then click **Import**. The **Open** dialog box opens.
5.  Navigate to the folder holding your background image, select the image, and then click **Open** to import the image.
6.  The **Open** dialog box closes, returning you to the **Select Resource** dialog box.
7.  Click **OK** to close the **Select Resource** dialog box.

Your background image is added to the [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) control.

### Using Code

Complete the following steps:

1.  Navigate to the Toolbox and double-click the [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) icon to add the [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) control to your form.
2.  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.
3.  Set the background image by adding the following code (replacing **C:\\YourImage.jpg** with your own path and image name) to the **Form\_Load** event:
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in Visual Basic
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```vbnet
    c1TopicBar1.BackgroundImage = System.Drawing.Image.FromFile(“C:\YourImage.jpg”)
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in C#
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```csharp
    c1TopicBar1.BackgroundImage = System.Drawing.Image.FromFile(@”C:\YourImage.jpg”);
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
4.  Press F5 to build the project.

### This topic illustrates the following:

In this topic, you learned how to add a background image using the Properties window and code. The following image depicts a [C1TopicBar](/componentone/docs/win/online-menus-toolbar/) control with a custom background image.

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

## See Also

[Adding an Icon to a Topic Page](/componentone/docs/win/online-menus-toolbar/menusandtoolbarsforw2/topicbartasks/customizingtheappear/addinganicontoatopic)