This is a migrated thread and some comments may be shown as answers.

Radwindow size to parent codebehind

2 Answers 148 Views
Window
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 19 Sep 2011, 10:19 AM
Hi,

I'm new to developing world as well as telerik.I have a web app where I'm using telerik controls.
I wanting to be able to size a rad window on open to the parent's size from code behind as to accmodate different resolutions.
Im using vb.net.

Im currently using the below but thats at a fixed pixel which is not what I'm looking for.

          

Private

Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click

Dim rw As New RadWindow

rw.ShowContentDuringLoad =

True

rw.Width = Unit.Pixel(1200)

 

rw.Height = Unit.Pixel(600)

rw.KeepInScreenBounds =

True

rw.Modal =

 

True

rw.NavigateUrl =

 

"test.aspx"

rw.VisibleOnPageLoad =

 

True

RadWindowManager1.Windows.Add(rw)
End Sub

 



Any help would be appreciated. Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Kevin
Top achievements
Rank 2
answered on 19 Sep 2011, 01:08 PM
Hello Derek,

I'm assuming that you want your RadWindow to be Maximized so it takes up the whole page size. You could do it by adding this line to your code:

rw.InitialBehaviors = WindowBehaviors.Maximize;

This will Maximize the window when the page loads.

I hope that helps.
0
Derek
Top achievements
Rank 1
answered on 19 Sep 2011, 02:17 PM
Thanks Kevin.

That should work, simple yet effective.
Tags
Window
Asked by
Derek
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
Derek
Top achievements
Rank 1
Share this question
or