tags:

views:

429

answers:

2

I can't get my silverlight control to go any taller than 600. Please see code below to reproduce this behavior. Notice that the color bands stop at exaclty 600. Can anyone tell me how to get this example to Show all rows in the grid?

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div>
            <asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/IT.xap" MinimumVersion="2.0.31005.0" Width="100%" Height="100%" />
            </div>
    </form>
</body>
</html>

<UserControl xmlns:my1="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" x:Class="IT.Test"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="400" Height="1225">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions >
            <RowDefinition Height="175"/>
            <RowDefinition  Height="175"/>
            <RowDefinition  Height="175"/>
            <RowDefinition  Height="175"/>
            <RowDefinition  Height="175"/>
            <RowDefinition Height="175" />
            <RowDefinition Height="175" />
        </Grid.RowDefinitions>

        <Rectangle Grid.Row="0" Fill="Green"/>
        <Rectangle Grid.Row="1" Fill="Red" />
        <Rectangle Grid.Row="2" Fill="Blue" />
        <Rectangle Grid.Row="3" Fill="Orange"/>
        <Rectangle Grid.Row="4" Fill="Yellow" />
        <Rectangle Grid.Row="5" Fill="Black" />
        <Rectangle Grid.Row="6" Fill="Aqua"/>

    </Grid>

A: 

I includee a bunch more code but it did not show up. I looked in FAQ on how to post code, but didn't see anything.

This is a comment, not an answer, please move it to a comment or edit your question.
Geoffrey Chetwood
Don't vote him down for being new, jeez.
jcollum
If he deletes his answer the downvote disappears. Otherwise, he gets the downvote. The answer is not helpful. That is the only basis for voting.
Geoffrey Chetwood
Please excuse my error, trying to figure out how to delete my answer. Terrence
A: 

I set the Grid's background to Gray (Background="Gray") and all the row heights to 50 to see what was going on. I think that your UserControl is taller than your browser's viewport, but since it's empty the scrollbars aren't showing up. So I get a gray band at the bottom that goes all the way down to the bottom of that page.

Edit: if you want a UserControl that takes up the entire viewport, remove the Width and Height from the UserControl tag.

jcollum
jcollum, thanks for your reply. removing the width and height from the usercontrol tag does not do the trick. Since you copied the code to your machine, can you get it to work?