Adding Text to the Content Panel
You can easily add a simple line of text to the content panel of the C1Expander control by setting the Content property to a string in the Properties window, in XAML, or in code.
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.
At Design Time
To set the Content property, complete the following steps:
1. Click the C1Expander control once to select it.
2. In the Properties window, set the Content property to a string (for example, "Hello World").
3. Run the program and then expand the C1Expander control.
In XAML
To set the Content property in XAML, complete the following steps:
1. Add Content="Hello World" to the <c1ext:C1Expander> tag so that it appears similar to the following:
<c1ext:C1Expander Name="C1Expander1" Content="Hello World" Width="150" Height="55">
2. Run the program and then expand the C1Expander control.
In Code
To set the Content property in code, complete the following steps:
1. Enter Code view and add the following code beneath the InitializeComponent() method:
C1Expander1.Content = "Hello World"
•C#
c1Expander1.Content = "Hello World";
2. Run the program and then expand the C1Expander control.
This Topic Illustrates the Following:
When the C1Expander control is expanded, it reads "Hello World". The end result of this topic should resemble the following: