Filling Out the Accordion's Height

The default behavior of an accordion pane (C1AccordionItem) is to fill only to the height (for accordions that expand up or down) or width (for accordions that expand right or left) of its contents. If you want the C1Accordion control to fill to a specific height or width, you will have to set the height or width of the control and then set the control's Fill property to True.

At Design Time in Blend

To set the Fill property in Blend, complete the following steps:

1.   Add three accordion panes to your C1Accordion control (see Adding Accordion Panes to the C1Accordion Control).

2.   Click the C1Accordion control once to select it.

3.   Under the Properties panel, complete the following:

      Select the Fill check box.

      Set the Height property to "200".

4.   Run the program.

In XAML

To set the Fill property to True in XAML, complete the following:

1.   Add Fill="True" to the <c1:C1Accordion> tag so that it appears similar to the following:

 

<c1:C1Accordion Fill="True">

 

2.   Add Height="200" to the <c1:C1Accordion> tag so that it appears similar to the following:

 

<c1:C1Accordion Fill="True" Height="200">

In Code

To set the Fill property in code, complete the following steps:

1.   Add x:Name="C1Accordion1" to the <c1:C1Accordion> tag so that the object will have a unique identifier for you to reference in code.

2.   Add and Height="200" to the <c1:C1Accordion> tag. This ensures that each accordion pane expands to fill a height of 200 pixels.

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

      Visual Basic

      C#

4.   Run the program.

 


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