title: Conversion error with style definition in WPF
body: <p>I'm working on following code .. of course, the solution gets built and compiles all that but when I hit F5 or start I get following error message.</p>
  
  <p><em>Cannot convert the value in attribute 'Style' to object of type 'System.Windows.Style'. Can only base on a Style with target type that is base type 'Rectangle'.  Error at object 'System.Windows.Shapes.Rectangle' in markup file</em> </p>
  
  <p>This is the code:</p>
  
  <pre><code>   &lt;Style x:Key="Connector1" TargetType="Rectangle" BasedOn="{StaticResource Style123}"&gt;
      &lt;Setter Property="Fill" Value="Aqua"  /&gt;
  &lt;/Style&gt;
  &lt;Style x:Key="Connector1_DragThumb" TargetType="Rectangle" BasedOn="{StaticResource Style123}"&gt;
      &lt;Setter Property="IsHitTestVisible" Value="true"/&gt;
      &lt;Setter Property="Fill" Value="Yellow"/&gt;
      &lt;Setter Property="Stroke" Value="Black"/&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>Any help is appreciated.</p>
  
  <p>Regards.</p>