Skip to main content

Microsoft Silverlight

Answered Question How to set Silverlight UserControl Height and Width to full screen dynamically???RSS Feed

(0)

chiragpa
chiragpa

Member

Member

11 points

37 Posts

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

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

 

Sledge70
Sledge70

Contributor

Contributor

5882 points

1,042 Posts

Re: How to set Silverlight UserControl Height and Width to full screen dynamically???

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.

______________________________________________________
Please mark replies as answers if they answered your question...

Flexman on Silverlight

pattormey
pattormey

Member

Member

35 points

18 Posts

Re: How to set Silverlight UserControl Height and Width to full screen dynamically???

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

Pat Tormey PE
MS MVP
New Hampshire USA
PTormey@4square.net

pattormey
pattormey

Member

Member

35 points

18 Posts

Answered Question

Re: How to set Silverlight UserControl Height and Width to full screen dynamically???

Seems sombody has a solution at http://forums.silverlight.net/forums/t/118940.aspx

Pat Tormey PE
MS MVP
New Hampshire USA
PTormey@4square.net
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities