SL3 Grid RowDefinition Height Problem

Posted by Chris on Stack Overflow See other posts from Stack Overflow or by Chris
Published on 2010-03-04T20:05:05Z Indexed on 2010/03/08 6:06 UTC
Read the original article Hit count: 256

Filed under:

I have a parent grid that contains multiple row definitions, all of which have their height set to 'auto'.

Within the parent grid are individual grids - each individual grid contains a custom content control.

When the custom content control loads, the height may increase. What I am noticing is that when the height does increase, the content overlaps with the content in other rows.

I have specified the horizontal and vertical alignments - am I missing something?

Here is an example:

<Grid x:Name="LayoutRoot">
    <Grid x:Name="ParentGrid>">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <CustomContentControl/>
        </Grid>
        <Grid Grid.Row="1">
            <CustomContentControl/>
        </Grid>
        <Grid Grid.Row="2">
            <CustomContentControl/>
        </Grid>
    </Grid>
</Grid>

© Stack Overflow or respective owner

Related posts about Silverlight