Rad Window opens too big

2 posts, 1 answers
  1. jason
    jason avatar
    28 posts
    Member since:
    Oct 2010

    Posted 27 Mar 2012 Link to this post

    I have a rad window that contains a data grid in it.  I have IsRestricted set to true but when I first open the window it's width is wider than the screen.  Once I click on the window it then resizes to fit the screen.  How can I fix this?  Attached is an image.
  2. Answer
    Ivo avatar
    390 posts

    Posted 29 Mar 2012 Link to this post

    Hi Jason,

    Actually this is a bug at our side. I have logged it into our PITS and you can track its status here. However there is an easy workaround for this. You can set the RadWindow's MaxWidth and MaxHeight to the current application size. Here is sample code:
    var plugin = Application.Current.Host.Content;
    Size size = new Size(plugin.ActualWidth, plugin.ActualHeight);
    RadWindow window = new RadWindow();
    window.MaxHeight = size.MaxHeight;
    window.MaxWidth = size.MaxWidth;

    I hope this workaround is acceptable for you.

    Greetings, Ivo
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top