title: How to create style based on default DataGrid style?
body: <p>I have custom control that extends <code>DataGrid</code>. It is called <code>ExtendedDataGrid</code>. I want to provide style for <code>ExtendedDataGrid</code> that is the same as <code>DataGrid</code>s style except it changes the template. I have tried something like this:</p>
  
  <pre><code>&lt;Style TargetType="{x:Type MyControls:ExtendedDataGrid}" BasedOn="{StaticResource {x:Type DataGrid}}"&gt;
      &lt;Setter Property="Template"&gt;
      ...
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>But it says that that the resource is not found.</p>
  
  <p>So I try:</p>
  
  <pre><code>&lt;Style TargetType="{x:Type MyControls:ExtendedDataGrid}" BasedOn="{StaticResource {ComponentResourceKey ResourceId=DataGridStyle, TypeInTargetAssembly={x:Type DataGrid}}}"&gt;
      &lt;Setter Property="Template"&gt;
      ...
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>But it also does not work... So what do I do ?</p>