title: Silverlight theme error: Cannot find a Resource with the Name/Key System.Windows.Controls.Primitives.DataGridRowHeader
body: <p>I have got an(other) error while trying to upgrade our large project to SL4. I didn't write the original theme and my theme knowlege isn't great. In my SL3 app I have a datagrid themed like so:</p>
  
  <pre><code> &lt;!--Datagrid Style--&gt;
      &lt;Style TargetType="datagrid:DataGrid"&gt;
          &lt;Setter Property="RowHeaderStyle" Value="{StaticResource System.Windows.Controls.Primitives.DataGridRowHeader}"/&gt;
          &lt;Setter Property="RowBackground" Value="Transparent"/&gt;
          &lt;Setter Property="etc" Value="..."/&gt;
      &lt;/Style&gt;
  </code></pre>
  
  <p>When I upgrade to SL 4 the first line in the XAML above gives a runtime error:<br>
  Cannot find a Resource with the Name/Key System.Windows.Controls.Primitives.DataGridRowHeader</p>
  
  <p>Should I handle this differently in SL4?</p>
  
  <p>EDIT: From the answer given it appears this should never have worked. Like i say i didn't write the original theme, so not sure what it's trying to do. If I do a search for that static resource line it does come up in a couple of places. Do you know what it was trying to acheive? Do you think I can safely remove the theme properties that are using this way of referencing (there aree several places where a control is referenced like this in the theme I have)?</p>
  
  <p>TIA</p>
  
  <p>Mark</p>
  
  <p>Example showing error:<br>
  <a href="http://walkersretreat.co.nz/files/SilverlightApplication1.zip" rel="nofollow noreferrer">http://walkersretreat.co.nz/files/SilverlightApplication1.zip</a></p>