AutoSize=true centers window

2 posts, 0 answers
  1. Teodorico
    Teodorico avatar
    39 posts
    Member since:
    Feb 2009

    Posted 31 May 2009 Link to this post

    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.

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 01 Jun 2009 Link to this post

    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.
Back to Top