pipelinecache
pipelinecache

Reputation: 4024

Auto RowDefinitions Grid with ContentControls

I have a Page with two ContentControls loaded by a RegionManager. A List of items, and a DetailView of these items. The problem is that the grid doesn't apply the auto height what I liked to. So I want to make all the available screen size to grid.row=0. I've added my code below:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition MinHeight="300" Height="Auto" />
        <RowDefinition Height="200"/>
    </Grid.RowDefinitions>

    <ContentControl Grid.Row="0" x:Name="ListRegion" ListMededelingRegion}" IsTabStop="False" Focusable="False" Height="Auto" />
    <ContentControl VerticalAlignment="Bottom" Grid.Row="1" x:Name="DetailRegion" cal:RegionManager.RegionName="{x:Static com:RegionNames.DetailRegion}" IsTabStop="False" Focusable="False" />
</Grid>

Upvotes: 1

Views: 848

Answers (1)

Thomas Levesque
Thomas Levesque

Reputation: 292415

Auto means "size to content" ; you need to specify * to use all available height :

<Grid.RowDefinitions>
    <RowDefinition MinHeight="300" Height="*" />
    <RowDefinition Height="200"/>
</Grid.RowDefinitions>

Upvotes: 2

Related Questions