Resize user control hosted in RadWindow

9 posts, 0 answers
  1. Lyle Groome
    Lyle Groome avatar
    22 posts
    Member since:
    Dec 2005

    Posted 30 Oct 2008 Link to this post

    I have a user control hosted in a RadWindow ( radWin.Context=myUserControl).  How do I get the user control to change size when whe the user changes the size of the RadWindow?
  2. Hristo Borisov
    Admin
    Hristo Borisov avatar
    298 posts

    Posted 31 Oct 2008 Link to this post

    Hi Lyle Groome,

    If main element inside your user control is grid, your User Control should strech by default. In case you experience some problems with that, you can call the static RadWindow method GetRadWindowParent in which you provide as a parameter your user control, and then add event handler to the SizeChanged event of RadWindow. Please feel free to contact me for any further assistance.

    Greetings,
    Hristo Borisov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft banner
  4. Henri
    Henri avatar
    74 posts
    Member since:
    Aug 2008

    Posted 08 Nov 2008 Link to this post

    I am experiencing the same problem as Lyle. A grid-usercontrol without  width or height inside the radwindow
    does not resize when the radwindow is resized.
    As a workaround, the page which contains  the radwindow can catch the resize event of the radwindow and then
    manually set the size of the radwindow content.
    see below, w1 is the radwindow specified in the page.xaml

    public Page()
    {
     InitializeComponent();
     this.w1.SizeChanged += new SizeChangedEventHandler(w1_SizeChanged);
    }

    void w1_SizeChanged(object sender, SizeChangedEventArgs e)
    {
     //do not use e.NewSize or we get layoutcycle problem
     MyControl c = w1.Content as MyControl; 
     c.Width = w1.Width;
     c.Height = w1.Height;
    }
     
    Note that the width and height will a bit too large, but i do not now how to get the correct available room in the radwindow....

  5. Hristo Borisov
    Admin
    Hristo Borisov avatar
    298 posts

    Posted 10 Nov 2008 Link to this post

    Hello Henri,

    The problem is quite simple, while creating the new themes for RadWindow we forgot to set up the behavior of the ContentControl of RadWindow to stretch its content horizontally and vertically.The issues is already resolved for our future releases, but if you are using some of our template please navigate to the ControlControl with x:Name="ContentElement" and set HorizontalContentAlignment and VerticalContentAlignment to stretch. Please excuse us for the caused inconvenience. Feel free to contact me for any further assistance.

    Kind regards,
    Hristo Borisov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Marco
    Marco avatar
    23 posts
    Member since:
    Apr 2009

    Posted 04 Jun 2009 Link to this post

    Hi,

    I have the same issue with a GridView inside a RadWindow.  The VerticalContentAlignment and HorizontalContentAlignment properties are set to "Stretch" to both GridView and RadWindow.  However, when I expand my window the grid doesn't get resized.

    By the way, I'm using version: 2009.1.526.1020

    Thanks in advance for your help,
    Marco
  7. Hristo Borisov
    Admin
    Hristo Borisov avatar
    298 posts

    Posted 11 Jun 2009 Link to this post

    Hello Marco,

    First of all I want to apologize for the this late response. Unfortunately the problem comes from our RadGridView control.Usually the ColumnsWidthMode property with value Fill should resolve your issue but we are facing some limitations if you integrate RadGridView with RadWindow. We are currently trying our best to resolve this issue. If you have any other problems please let us know.

    Sincerely yours,
    Hristo Borisov
    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.
  8. Syed Danish
    Syed Danish avatar
    70 posts
    Member since:
    Dec 2009

    Posted 17 Dec 2009 Link to this post

    Hi,

    I am also facing the same problem the contents in the RadWindow dosent get resize, when the size of the RadWindow is changed. By the way I am using Composite Application Guidance and the regions are also made in the RadWindow. The Control placed in the Region of the Rad window is an Outlook Bar. How can I control this Size the Outlook Bar in the Region of the RadWindow.

    I am using the version 2009.3.1103.


    Regards
    Syed Danish
  9. Hristo Borisov
    Admin
    Hristo Borisov avatar
    298 posts

    Posted 21 Dec 2009 Link to this post

    Hi Syed Danish,

    Can you give us a sample code or a project in which we can reproduce the issue as we haven't experience such problems before. Thank you for your collaboration, and we look forward to receiving your answer, until then, excuse us for any inconvenience caused by this problem.

    Best wishes,
    Hristo Borisov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  10. Syed Danish
    Syed Danish avatar
    70 posts
    Member since:
    Dec 2009

    Posted 16 Feb 2010 Link to this post

    Hi,

    Hey guys can any one help me out of this tricky situation. As you all know we need a fixed size for the Rad Window to open. My requirement here is if the Browser window size is changed(other than maximized) the RadWindow should be maximized and if the RadWindow is normal i.e. if it is maximized then the RadWindow should take its specified size.

    Thanks and Regards,
    Syed Danish 
Back to Top
DevCraft banner