Center Horizontally

4 posts, 0 answers
  1. Justin Lee
    Justin Lee avatar
    149 posts
    Member since:
    Dec 2009

    Posted 20 Dec 2012 Link to this post

    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
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 24 Dec 2012 Link to this post

    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.

  3. DevCraft banner
  4. Justin Lee
    Justin Lee avatar
    149 posts
    Member since:
    Dec 2009

    Posted 27 Dec 2012 Link to this post

    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
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 28 Dec 2012 Link to this post

    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.

Back to Top