Applying a background color to an entire Grid row in XAML Silverlight

Viewed 33504

I'm trying to apply a gradient background to just one row in a XAML Silverlight grid that I've created.

I can do something like this without any trouble:

<Grid>
    <Grid.Background>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="Black" Offset="0" />
            <GradientStop Color="White" Offset="1" />
        </LinearGradientBrush>
    </Grid.Background>

    <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
    </Grid.RowDefinitions>

    <!-- components and various stuffs -->
</Grid>

Unfortunately this applies the gradient to the entire grid.

It seems as though I can't apply a gradient (or even a color) to an individual row definition in the grid. Is it possible?

Thanks!

2 Answers
Related