Extended Library for WPF and Silverlight | ComponentOne
Accordion / Accordion Task-Based Help / Filling Out the Accordion Height
In This Topic
    Filling Out the Accordion Height
    In This Topic

    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 C1Accordion.Fill property to True.

    At Design Time in Design view

    To set the Fill property in Design view, 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.

    In the Properties window, complete the following:

    In XAML

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

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

    XAML
    Copy Code
    <c1ext:C1Accordion Name="C1Accordion1" Fill="True">
    

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

    XAML
    Copy Code
    <c1ext:C1Accordion Name="C1Accordion1" Fill="True" Height="200">
    

     

    In Code

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

    1. Add and Height="200" to the <c1ext:C1Accordion> tag. This ensures that each accordion pane expands to fill a height of 200 pixels.
    2. Enter Code view and add the following code beneath the InitializeComponent() method:

    Visual Basic
    Copy Code
    C1Accordion1.Fill = True
    

    C#
    Copy Code
    c1Accordion1.Fill = true;
    

     

    1. Run the program.