ComponentOne Expander for ASP.NET Web Forms
Task-Based Help / Resizing the Control
In This Topic
    Resizing the Control
    In This Topic

    You can easily change the height and width on the C1Expander by setting the Height and Width properties. By default the height of the control is set to 200px and the width of the control is set to 100px. You can easily change the control's height and width in Design view, Source view, from the C1Expander Tasks menu, from the Properties window, or in code.

    In Source View

    In Source view add Height="150px" and Width="150px" in the <cc1:C1Expander> tag to the size you wish to set the control's height and width to, for example:

    <cc1:C1Expander ID="C1Expander1" runat="server" Height="150px" Width="150px">
    

    The above will resize the control to 150 pixels tall and 150 pixels wide.

    From the Properties Window

    You can change the Height and Width properties to set the control's height and width in the Properties window:

    1. Click on the C1Expander to select it.
    2. Navigate to the Properties window and if needed expand the Layout node to locate the Height and Width properties.
    3. Next to Height, enter a value for the size you want the control's height to be, for example "150px".
    4. Next to Width, enter a value for the size you want the control's width to be, for example "150px".
    5. 10.  Press the ENTER key or click outside of the Properties window for the height and width you set to be applied to the C1Expander control.

    In Code

    Add the following code to the Page_Load event to set the Height and Width properties to 150 pixels:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1Expander1.Height = 150
    Me.C1Expander1.Width = 150
    

    To write code in C#

    C#
    Copy Code
    this.C1Expander1.Height = 150;
    this.C1Expander1.Width = 150;
    
    See Also