How can I go about specifying absolute Offset
s for the GradientStop
s in my LinearGradientBrush
?
I have a GridView
with a LinearGradientBrush
as the background:
<Grid.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0" Color="White" />
<GradientStop Offset="0.25" Color="White" />
<GradientStop Offset="0.4" Color="WhiteSmoke" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Grid.Background>
When the grid is at its default size, the white area of the gradient is about 60 pixel units tall. When I resize the grid, the gradient stretches and the white area gets larger. How can I keep the white area the same height, but stretch the rest of the gradient?
The white area corresponds to one row in the grid, so if there's a way to make the gradient span every row but the first one, that would work just fine.