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

Center Horizontally

3 Answers 54 Views
Window
This is a migrated thread and some comments may be shown as answers.
Justin Lee
Top achievements
Rank 1
Justin Lee asked on 20 Dec 2012, 08:34 PM
Is there anyway to center a RadWindow horizontally, but set the distance to the top of the parent manually? 
Like for a grid it would be:  HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,50,0,0"
How can I do this with a RadWindow's startup location?

Thanks,
Justin

3 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 24 Dec 2012, 02:54 PM
Hi Justin,

You could use the Left and Top properties of the RadWindow to position it to fit your requirements.

Greetings,
Konstantina
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Justin Lee
Top achievements
Rank 1
answered on 27 Dec 2012, 03:39 PM
Using the Top and Left properties, there is no way to center the window horizontally.  (The Silverlight app is the size of the browser - so its not a fixed size)

I need to center it horizontally, but fix the distance from the top.

Thanks,
Justin
0
Konstantina
Telerik team
answered on 28 Dec 2012, 02:49 PM
Hi Justin,

Because the size of the browser is not fixed, you will need to calculate the value of the Top property, which needs to be set, every time the size of the browser is changed. Please find attached a sample application which illustrates this.

All the best,
Konstantina
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Window
Asked by
Justin Lee
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Justin Lee
Top achievements
Rank 1
Share this question
or