You can easily add a simple line of text to the content area of an accordion pane by setting the Content property to a string in Blend, in XAML, or in code. This topic assumes that you have added a C1Accordion control with at least one C1AccordionItem item to your project.
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 C1AccordionItem item once to select it.
2. Under the Properties panel, set the Content property to a string (for example, "Hello World").
3. Run the program and expand the accordion pane.
In XAML
To set theContent property in XAML, complete the following:
1. Add Content="Hello World" to the <c1:C1AccordionItem> tag so that it appears similar to the following:
<c1:C1AccordionItem Content="Hello World" Width="150" Height="55">
2. Run the program and expand the accordion pane.
In Code
To set the Content property in code, complete the following steps:
1. Add x:Name="C1AccordionItem1" to the <c1:C1AccordionItem> tag so that the object will have a unique identifier for you to call in code.
2. Enter Code view and add the following code beneath the InitializeComponent() method:
C1AccordionItem1.Content = "Hello World"
•C#
C1AccordionItem1.Content = "Hello World";
3. Run the program and expand the accordion pane.
This Topic Illustrates the Following:
The content of your accordion pane now reads "Hello World". The end result of this topic should resemble the following:
