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

Preventing Window Repositioning

By default users can reposition the dialog window at run time through a drag-and-drop operation. If you do not want users to be able to move the dialog window you can prevent this in Source view, Design view, or in code by setting the AllowMove property.

In Source View

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

<cc1:C1Window ID="C1Window1" runat="server" AllowMove="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 repositioning the C1Window dialog window navigate to the Properties window and set AllowMove to False.

 

In Code

To prevent users from repositioning the C1Window dialog window in code, add the following code to your project:

      Visual Basic

C1Window1.AllowMove = False

      C#

C1Window1.AllowMove = false;

This topic illustrates the following:

Run your application and notice that you cannot reposition the dialog window at run time.


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