ComponentOne Window for ASP.NET AJAX: Window for ASP.NET AJAX Task-Based Help > Customizing the Dialog Window > Preventing Window Resizing

Preventing Window Resizing

By default users can resize the dialog window at run time, but you can prevent users from doing so by using the AllowResize property. You can set the AllowResize property in Source view, Design view, or in code.

In Source View

To prevent users from resizing the C1Window dialog window add AllowResize="False" to the <cc1:Window> tag so it appears similar to the following:

<cc1:C1Window ID="C1Window1" runat="server" AllowResize="False">

    <CaptionButtons>

        <CollapseExpandButton Visible="False" />

        <CloseButton Visible="True" />

        <Icon Visible="True" />

        <MaximizeButton Visible="True" />

        <MinimizeButton Visible="True" />

        <PinButton Visible="False" />

        <ReloadButton Visible="False" />

    </CaptionButtons>

</cc1:C1Window>

In Design View

To prevent users from resizing the C1Window dialog window navigate to the Properties window and set the AllowResize property to False.

 

In Code

To allow users to resize the C1Window dialog window in code, add the following code to your project:

      Visual Basic

C1Window1.AllowResize = False

      C#

C1Window1.AllowResize = false;

This topic illustrates:

After setting the AllowResize property to True, run the application and observe that you can no longer resize the dialog window at run time by dragging the bottom right corner of the dialog window.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.