This is a migrated thread and some comments may be shown as answers.

AutoSize=true centers window

1 Answer 103 Views
Window
This is a migrated thread and some comments may be shown as answers.
Teodorico
Top achievements
Rank 1
Teodorico asked on 31 May 2009, 09:43 PM

I am following the recommendation from this post:
http://www.telerik.com/community/forums/aspnet-ajax/window/how-to-load-radwindow-silently-in-the-background.aspx

And it works fine but for the fact that setting AutoSize to true automatically centers the form even if it is not modal. It displayes centered before I call set_modal(true), so for the moment I am forced to manually set width and height of each form.

  

<telerik:RadWindow ID="radWindowLevel0" runat="server" IconUrl="Application/Images/16x16/EditForm.png"

 

 

Left="-5000px" Top="-5000px" ReloadOnShow="false" ShowContentDuringLoad="true" Modal="false" AutoSize="false" KeepInScreenBounds="false" Overlay="true" VisibleOnPageLoad="false" VisibleStatusbar="false" Behavior="Close" OnClientClose="radWindowLevel_Close" />

 

 

 

 

 

Any recommendation?

 

 Thanks.

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 01 Jun 2009, 10:45 AM
Hi Teodorico,

This behavior is expected - the AutoSize functionality uses the viewport coordinates to properly resize and position the window and if the Top and Left properties are set with negative values, it will reposition the window to ensure that it is visible.

What I suggest is not to set the AutoSize property to true in the declaration. For example you can call the autoSize() client-side method when showing the window in the viewport (after loading it).


Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
Teodorico
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or