title: Why does my Rectangle's Fill not update when the GradientStops within the Brush change?
body: <p>I'm trying to make a gradient editor in WPF. To do this, I'm using a GradientStopCollection as a DataContext for an Rectangle (to display the gradient) and an ItemsControl (to display controls for editing the Stops).</p>
  
  <pre><code>  &lt;Window x:Class="My.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Height="350" Width="525"&gt;
       &lt;StackPanel&gt;
          &lt;StackPanel.DataContext&gt;
             &lt;GradientStopCollection&gt;
                &lt;GradientStop Color="Black" Offset=".25"/&gt;
                &lt;GradientStop Color="White" Offset=".75"/&gt;
             &lt;/GradientStopCollection&gt;
          &lt;/StackPanel.DataContext&gt;
          &lt;Rectangle Height="100"&gt;
             &lt;Rectangle.Fill&gt;
                &lt;LinearGradientBrush GradientStops="{Binding}"/&gt;
             &lt;/Rectangle.Fill&gt;
          &lt;/Rectangle&gt;
          &lt;ItemsControl ItemsSource="{Binding}"&gt;
             &lt;ItemsControl.ItemTemplate&gt;
                &lt;DataTemplate&gt;
                   &lt;Slider Maximum="1" Value="{Binding Offset}"/&gt;
                &lt;/DataTemplate&gt;
             &lt;/ItemsControl.ItemTemplate&gt;
          &lt;/ItemsControl&gt;
       &lt;/StackPanel&gt;
    &lt;/Window&gt;
  </code></pre>
  
  <p>When run the app and move the lower slider, Snoop tells me that the rectangle.Fill.GradientStops[1].Offset has changed. However, the Rectangle's gradient appears to have not changed to reflect the GradientStop's new offset.</p>
  
  <p>Aren't Bindings supposed to make the Rectangle update automatically? How can I get the Rectangle's fill to update without needing to create a new set of GradientStops every time a user touches a slider?</p>