Accordion > Quick Start: Accordion for Silverlight > Step 3 of 4: Adding Accordion Panes |
In the last step, you customized the appearance and behavior of the C1Accordion control. In the next step, you will add accordion panes, which you will customize and add content to.
Complete the following steps.
XAML Copy Code <c1:C1AccordionItem></c1:C1AccordionItem> <c1:C1AccordionItem></c1:C1AccordionItem> <c1:C1AccordionItem></c1:C1AccordionItem>
XAML Copy Code <c1:C1AccordionItem Header="Pane 1"></c1:C1AccordionItem> <c1:C1AccordionItem Header="Pane 2"></c1:C1AccordionItem> <c1:C1AccordionItem Header="Pane 3"></c1:C1AccordionItem>
XAML Copy Code <c1:C1AccordionItem Header="Pane 1" Background="Aqua"></c1:C1AccordionItem> <c1:C1AccordionItem Header="Pane 2" Background="AliceBlue"></c1:C1AccordionItem> <c1:C1AccordionItem Header="Pane 3" Background="LawnGreen"></c1:C1AccordionItem>
a. Add Content="This is text content" to the first <c1:C1AccordionItem> tag so that the XAML resembles the following:
<c1:C1AccordionItem Header="Pane 1" Background="Aqua" Content="This is text content">
b. Place your cursor between the second set of <c1:C1AccordionItem> and </c1:C1AccordionItem> tags and press ENTER.
c. Navigate to the Toolbox and double-click the Calendar icon to add a Calendar control as the second pane's content. The XAML resembles the following:
<c1:C1AccordionItem Header="Pane 2" Background="AliceBlue">
<sdk:Calendar></sdk:Calendar>
</c1:C1AccordionItem>
XAML Copy Code <c1:C1AccordionItem Header="Pane 2" Background="AliceBlue" IsExpanded="True">
In this step, you added three accordion panes to the C1Accordion control and then added content to two of the accordion panes. In the next step, you will run the project and observe the run time features of the control.