# Adding Text to the Content Panel

## Content

You can easily add a simple line of text to the content panel of [C1HeaderedContentControl](/componentone/api/wpf/online-basiclibrary/dotnet-framework-api/C1.WPF.4.6.2/C1.WPF.C1HeaderedContentControl.html) by setting the **Content** property to a string in Visual Studio, in XAML, or in code.

>type=note
> **Note**: You can also add text to the content panel by adding a **TextBox** control to the content panel and then setting the **TextBox** control's **Text** property. To learn how to add a control to the content panel, see [Adding a Control to the content panel](/componentone/docs/wpf/online-basiclibrary/overview/HeaderedContentControl/HeaderedContentControlTask-BasedHelp/AddingContenttotheContentPanel/AddingaControltotheContentPanel).

**At Design Time**
To set the **Content** property in Visual studio, complete the following steps:

1. Click **C1HeaderedContentControl** once to select it.
2. Under the **Properties** tab, set the **Content** property to a string (for example, "Hello World").
3. Run the program and then expand **C1HeaderedContentControl**.

**In XAML**

To set the **Content** property in XAML, complete the following steps:

1. Add `Content="This is Content Panel"` to the `<c1:C1HeaderedContentControl>` tag so that it appears similar to the following:

    ```xml
    <c1:C1HeaderedContentControl Content="This is Content Panel" Width="150" Height="55">
    ```
2. Run the program and then expand **C1HeaderedContentControl**.

**In Code**

To set the **Content** property in code, complete the following steps:

1. Add `x:Name="C1HeaderedContentControl_Ct"` to the `<c1:C1HeaderedContentControl>` tag so that the control will have a unique identifier for you to call in code.
2. Enter Code view and add the following code beneath the **InitializeComponent()** method:
<br>
    DOC-DETAILS-TAG-OPEN
<br>
    DOC-SUMMARY-TAG-OPEN
<br>
    Visual Basic
<br>
    DOC-SUMMARY-TAG-CLOSE

    ```vbnet
    C1HeaderedContentControl_Ct.Content = "This is Content Panel"
    ```

    DOC-DETAILS-TAG-CLOSE
<br>
    DOC-DETAILS-TAG-OPEN
<br>
    DOC-SUMMARY-TAG-OPEN
<br>
    C#
<br>
    DOC-SUMMARY-TAG-CLOSE

    ```csharp
    C1HeaderedContentControl_Ct.Content = "This is Content Panel";
    ```

    DOC-DETAILS-TAG-CLOSE
3. Run the program and then expand **C1HeaderedContentControl**.

**This Topic Illustrates the Following**:
When **C1HeaderedContentControl** is expanded, it reads "Hello World". The end result of this topic should resemble the following:
![C1WPF Basic Library - Text to Content Panel result](https://cdn.mescius.io/document-site-files/images/7e9deccd-1f1c-4ec7-af90-b4332b45dead/images/headercontentcontrol/contentpaneltext.png)
Note that there isn't a header; this is because the Header property isn't set by default. To learn how to add text or controls to the header bar, see [Adding Content to the Header Bar](/componentone/docs/wpf/online-basiclibrary/overview/HeaderedContentControl/HeaderedContentControlTask-BasedHelp/AddingContenttotheHeaderBar).