You can easily add a simple line of text to the content area of the C1Expander control by setting the Content property to a string in Blend, in XAML, or in code.
Note: You can also add text to the content area by adding a TextBox control to the content area and then setting the TextBox control's Text property. To learn how to add a control to the content area, see Adding a Control to the Content Area.
At Design Time in Blend
To set the Content property in Blend, complete the following steps:
1. Click the C1Expander control 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 the C1Expander control.
In XAML
To set the Content property in XAML, complete the following steps:
1. Add Content="Hello World" to the <c1:C1Expander> tag so that it appears similar to the following:
<c1:C1Expander 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. Add x:Name="C1Expander1" to the <c1:C1Expander> 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:
C1Expander1.Content = "Hello World"
•C#
C1Expander1.Content = "Hello World";
3. 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:
