Here is one alternative:
<Border BorderBrush="Black" BorderThickness="2" CornerRadius="3" Padding="3"> <Grid Width="20" Height="100"> <Grid Height="{Binding ProgressValue}" VerticalAlignment="Bottom"> <Grid Height="100" VerticalAlignment="Bottom"> <Grid.Background> <LinearGradientBrush StartPoint="0,0" EndPoint="1,1"> <GradientStop Color="Yellow" Offset="0.0" /> <GradientStop Color="Red" Offset="0.25" /> <GradientStop Color="Blue" Offset="0.75" /> <GradientStop Color="LimeGreen" Offset="1.0" /> </LinearGradientBrush> </Grid.Background> </Grid> </Grid> </Grid> </Border>
Pay attention to the third line at the top, where you attach your progress value.
Aviad P.
source share