How to set Silverlight UserControl Height and Width to full screen dynamically??? RRS feed

  • Question

  • I have created one Silverlight Control and that control is placed on another Silverlight Page. i have one functionality on user control to see the page in Full screen. I have implemented it through

    Application.Current.Host.Content.IsFullScreen = true;

    It is working but in full screen mode my control/page doesnt scale. its size remain same and broswer becomes full screen mode. I want my user control/ container page to scale accoring to the space availability in full screen mode.

    How should i set height and width of my user control dynamically???


    Friday, November 6, 2009 1:55 PM


All replies

  • Either don't set the width and height of your root control or set them to auto.

    Set the Horizontal and Vertical alignment to Stretch.

    Friday, November 6, 2009 2:14 PM
  • It would seem that you'd need to know the size of the users screen, unless you can find a container control that supports "Fill" and even then how whould t know the size of the users screen.

     The Autozise stuff seems to only auto to size for the control's content. Not the browser.. 

    Tuesday, November 10, 2009 6:25 AM
  • Tuesday, November 10, 2009 6:28 AM