I want my Silverlight app to fill the entire browser window. I’ve set the plugin object width and height to 100%, and set my LayoutRoot container’s height and width to Auto, but still no luck. Any suggestions?
<form id='form1' runat='server'> <asp:ScriptManager ID='ScriptManager1' runat='server' /> <asp:Silverlight ID='Silverlight1' runat='server' Source='~/ClientBin/Client.xap' MinimumVersion='2.0.30818.0' AutoUpgrade='true' Height='100%' Width='100%'> </asp:Silverlight> </form> <UserControl x:Class='Client.Page' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' Height='Auto' Width='Auto'> <Grid x:Name='LayoutRoot' Background='#084E85' ShowGridLines='True'> <Grid.ColumnDefinitions> <ColumnDefinition Width='280' /> <ColumnDefinition Width='Auto' /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height='80' /> <RowDefinition Height='Auto' /> <RowDefinition Height='600' /> </Grid.RowDefinitions> ...Remaining content here... </Grid> </UserControl>
Disclaimer: I searched for an answer first, finding this thread. However, as you can see by my code that isn’t working for me.
First, I don’t set the height/width in the user control. Instead, I set the DesignHeight and DesignWidth (in the ‘
http://schemas.microsoft.com/expression/blend/2008‘ namespace) and I set the alignment to stretchIn my HTML, I set the Height and Width to 100% like this…
At that point, everything works for me to have it take the entire window.