title: Databinding WPF Rectangle gradient fill
body: <p>I'm attempting to databind a gradient brush as a Rectangle fill. What do I need to do to get the commented-out binding to work?  StartColor and EndColor are declared as System.Drawing.Color.</p>
  
  <pre><code>&lt;Rectangle Width="100" Height="20"&gt;
    &lt;Rectangle.Fill&gt;
      &lt;LinearGradientBrush&gt;
        &lt;GradientStop Offset="0" Color="Pink"/&gt;
        &lt;GradientStop Offset="1"  Color="Red"/&gt;
        &lt;!--&lt;GradientStop Offset="0" Color="{Binding Path=StartColor}"/&gt;--&gt;
        &lt;!--&lt;GradientStop Offset="1" Color="{Binding Path=EndColor}" /&gt;--&gt;
      &lt;/LinearGradientBrush&gt;
    &lt;/Rectangle.Fill&gt;
  &lt;/Rectangle&gt;
  </code></pre>