RadWindow doesn't resize to its contents

2 posts, 0 answers
  1. Lance
    Lance avatar
    34 posts
    Member since:
    Sep 2007

    Posted 11 Feb 2011 Link to this post

    Hi,

    I've got a public static RadWindow that I use globally throughout my application.  I have several usercontrols of varying sizes that I load via this RadWindow by setting them to be the RadWindow's content and then running the RadWindow's ShowDialog method.  The RadWindow seems to have a maximum width and height that I didn't set, which has the effect of cutting off parts of my larger controls.  If I use the Microsoft ChildWindow it resizes correctly so I assume its a problem with RadWindow and not my controls.  I am using the internal build 2010.3.1331.   Is this a bug? 

    If I resize the window for the larger controls it stays large when the smaller controls are the RadWindow's content.

    Please advise.
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 16 Feb 2011 Link to this post

    Hello Tim,

     Currently if you don't set Width and Height to the RadWindow control it tries to auto-size to its content, but as we don't want to measure with infinite size (because this will break the virtualized controls) we decided to measure it with some size relative to the size of the Silverlight plugin - 0.75 of its width and height. This acts like MaxWidth/Height. To overcome this you may set MaxWidth and MaxHeight to the RadWindow control to some big value like 10000 and this will measure it with this size.

    About the other problem - if you are using the same window instance it is normal for it to keep the size the user picked up by resizing - resizing changes the Width and Height of the RadWindow control. What I would suggest you for this case is to clear the Width and Height before showing new content in the Window.

    If you have further questions, don't hesitate to ask!

    Kind regards,
    Miroslav Nedyalkov
    the Telerik team
  3. DevCraft banner
Back to Top