title: Make a style for the datagrid.columns
body: <p>I'm still struggling on something. All examples i see on the internet apply datagrid.columns in the resources of the datagrid itself. I don't want that. I want to define a template or style in the window.resources which has to apply to the datagrid through binding. Can i and how can i do that? This is the xaml in my control's resources :</p>
  
  <pre><code>        &lt;DataGrid Name="dgFruit" ItemsSource="{Binding}" AutoGenerateColumns="false" Style="{StaticResource datagrid}" &gt;
              &lt;DataGrid.Columns&gt;
                  &lt;DataGridTextColumn Binding="{Binding Path=Name}" Header="Name"/&gt;
                  &lt;DataGridTextColumn Binding="{Binding Path=Color}" Header="Color"/&gt;
                  &lt;DataGridCheckBoxColumn Binding="{Binding Path=Mjummy}" Header="Mjummy"/&gt;
                  &lt;DataGridTextColumn Binding="{Binding Path=Number}" Header="Number"/&gt;
                  &lt;DataGridTextColumn Binding="{Binding Path=Pits.Count}" Header="Pits"/&gt;
              &lt;/DataGrid.Columns&gt;
          &lt;/DataGrid&gt;
  </code></pre>