<Grid>
<Rectangle HorizontalAlignment="Left" Height="159" Margin="174.5,17.5,0,0" Stroke="Black" VerticalAlignment="Top" Width="152" RenderTransformOrigin="0.5,0.5" RadiusY="18.5" RadiusX="18.5">
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-90"/>
<TranslateTransform/>
</TransformGroup>
</Rectangle.RenderTransform>
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="{Binding Value, ElementName=slider}"/>
<GradientStop Color="White" Offset="{Binding Value, ElementName=slider}"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Slider x:Name="slider" HorizontalAlignment="Left" Margin="172,207,0,0" VerticalAlignment="Top" Width="165" LargeChange="0.1" Maximum="1" TickFrequency="0.1"/>
</Grid>
Here is the Code that would help you. I have take a rectangle in my case, set its background to gradient. As gradient as two stops, I set them in such a way that both appear to be a single fill. I bind both gradient stops with a slider and customized the slider , its large change , step frequency and etc. Now as i move my slider the fill color also changes as you required. Bind both stops of gradient color to your dependance property and you would be done with it. Hope this solution might work for you.
Here are few results of what I made.
happy coding !
Let me know if you have some questions.