Adding a Control to the Content Area

Each accordion pane (C1AccordionItem) will accept one child control in its content area. In this topic, you will add a WPF button control in Design view, in XAML, and in code.

This topic assumes that you have added a C1Accordion control with at least one C1AccordionItem item to your project.

At Design Time in Design view

To add a Button control to the content area, complete the following steps:

1.   Select the accordion pane you wish to add the control to.

2.   Double click the Button icon to add it to the accordion pane's content area.

3.   In the designer, select the Button control so that its properties take focus in the Properties window. 

4.   Set the Width property to "Auto".

5.   Set the Height property to "Auto".

6.   Run the program and expand the accordion pane to reveal the button control.

In XAML

Complete the following steps:

1.   To add a Button control to the content area in XAML, complete the following:

2.   Place the following markup between the <c1ext:C1AccordionItem> and </c1ext:C1AccordionItem> tags:

 

       <Button Content="Button" Height="Auto" Width="Auto"/>

 

3.   Run the program and expand the accordion pane to reveal the button control.

In Code

To add a Button control to the content area in code, complete the following:

1.   Enter Code view and add the following code beneath the InitializeComponent() method:

      Visual Basic

      C#

2.   Run the program and expand the accordion pane to reveal the button control.

 This Topic Illustrates the Following:

When accordion pane is expanded, the button control will appear in its content area, resembling the following image:

 


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.