This is a migrated thread and some comments may be shown as answers.
Resize user control hosted in RadWindow
8 Answers 229 Views
This is a migrated thread and some comments may be shown as answers.
Lyle Groome
Top achievements
Rank 2
Lyle Groome asked on 30 Oct 2008, 04:26 PM
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?

8 Answers, 1 is accepted

Sort by
0
Hristo Borisov
Telerik team
answered on 31 Oct 2008, 08:59 AM
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.
0
Henri
Top achievements
Rank 1
answered on 08 Nov 2008, 11:15 AM

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....

0
Hristo Borisov
Telerik team
answered on 10 Nov 2008, 11:08 PM
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.
0
Marco
Top achievements
Rank 1
answered on 04 Jun 2009, 04:26 PM
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
0
Hristo Borisov
Telerik team
answered on 11 Jun 2009, 03:06 PM
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.
0
Syed Danish
Top achievements
Rank 1
answered on 17 Dec 2009, 02:11 PM
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
0
Hristo Borisov
Telerik team
answered on 21 Dec 2009, 01:20 PM
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.
0
Syed Danish
Top achievements
Rank 1
answered on 16 Feb 2010, 11:12 AM
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 
Asked by
Lyle Groome
Top achievements
Rank 2
Answers by
Hristo Borisov
Telerik team
Henri
Top achievements
Rank 1
Marco
Top achievements
Rank 1
Syed Danish
Top achievements
Rank 1
Share this question
or