Adding Text to the Header Bar
By default, the C1Expander control's header bar is empty. You can add text to the control's header bar by setting the Header property to a string in the Properties window, in XAML, or in code.
At Design Time
To set the Header property, complete the following steps:
1. Click the C1Expander control once to select it.
2. In the Properties window, set the Header property to a string (for example, "Hello World").
In XAML
To set the Header property in XAML, add Header="Hello World" to the <c1ext:C1Expander> tag so that it appears similar to the following:
<c1ext:C1Expander Name="C1Expander" Header="Hello World" Width="150" Height="55">
In Code
To set the Header property in code, complete the following steps:
1. Enter Code view and add the following code beneath the InitializeComponent() method:
C1Expander1.Header = "Hello World"
•C#
c1Expander1.Header = "Hello World";
2. Run the program.
This Topic Illustrates the Following:
The header bar of the C1Expander control now reads "Hello World". The end result of this topic should resemble the following: