Task-Based Help / Customizing the C1Dialog Control / Customizing the Width and Height of C1Dialog
Customizing the Width and Height of C1Dialog

This topic will take you through customizing the width and height ofC1Dialog. This can be done in the Design View, in the Source View, in Code, or at run time.

In Design View

Complete the following steps:

  1. Navigate to the C1Dialog Properties window and find the Height property in the list.
  2. Set the height of the control in pixels, for this topic, set it to 400px.
  3. Find the Width property in the list. Set the width of the control in pixels, for this topic, set it to 400px.
  4. Press F5 to run the program and see the changes you made.

In Source View

Complete the following steps:

  1. Go to your project's Source View.
  2. The Height and Width properties are both within the <cc1:C1Dialog> tags:

    To write code in Source View

    <cc1:C1Dialog ID="C1Dialog1" runat="server" CloseOnEscape="False"
    Height="400px" Width="400px">
     
    
  3. Set the Height and Width properties to 400px.
  4. Press F5 to run your program.

In Code

Add the following code to the Page_Load event to set the Height and Width properties of the C1Dialog control.

To write code in Visual Basic

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

To write code in C#

C#
Copy Code
this.C1Dialog1.Height = 150;
this.C1Dialog1.Width = 150;

At Run Time

Complete the following steps:

You can set the width and height of your dialog window at run time, as well.

  1. Press F5 to run your program.
  2. Hover over a corner or edge of your C1Dialog|tag=C1Dialog_Class control.
  3. Use the arrows to resize your C1Dialog|tag=C1Dialog_Class control.