title: How to style the top-left corner of a DataGrid in XAML?
body: <p>Related to this question: <a href="https://stackoverflow.com/questions/8328328/style-datagrid-table-top-left-corner">Style datagrid table - Top left corner</a>.</p>
  
  <p>I have a <code>DataGrid</code> (not finished yet, excuse the styles). How can I change the background colour of the top-left corner using XAML (as opposed to C# in the other question)?</p>
  
  <p><img src="https://i.stack.imgur.com/YDp5F.png" alt=""></p>
  
  <p>Here's my current XAML:</p>
  
  <pre><code>&lt;DataGrid x:Name="DataGrid" HorizontalAlignment="Center" VerticalAlignment="Center"
            ColumnWidth="100" ColumnHeaderHeight="50" RowHeight="50" RowHeaderWidth="115" Padding="5"
            BorderBrush="#FF646464" FontSize="18" FontFamily="Segoe UI"
            CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserSortColumns="False" CanUserResizeRows="False"
            Focusable="False" IsEnabled="False" IsReadOnly="True"&gt;
      &lt;DataGrid.Background&gt;
          &lt;SolidColorBrush Color="#FFFFFFC8"/&gt;
      &lt;/DataGrid.Background&gt;
      &lt;DataGrid.Columns&gt;
          &lt;DataGridTextColumn Binding="{Binding In}" Header="In"/&gt;
          &lt;DataGridTextColumn Binding="{Binding Out}" Header="Out"/&gt;
          &lt;DataGridTextColumn Binding="{x:Null}" Header="Hours"/&gt;
      &lt;/DataGrid.Columns&gt;
      &lt;DataGrid.ColumnHeaderStyle&gt;
          &lt;Style TargetType="{x:Type DataGridColumnHeader}"&gt;
              &lt;Setter Property="Background" Value="#FFFFFFC8"/&gt;
              &lt;Setter Property="BorderBrush" Value="DarkSlateGray"/&gt;
              &lt;Setter Property="BorderThickness" Value="1, 2"/&gt;
              &lt;Setter Property="FontWeight" Value="SemiBold"/&gt;
              &lt;Setter Property="HorizontalContentAlignment" Value="Center"/&gt;
              &lt;Setter Property="Padding" Value="5"/&gt;
          &lt;/Style&gt;
      &lt;/DataGrid.ColumnHeaderStyle&gt;
      &lt;DataGrid.RowBackground&gt;
          &lt;SolidColorBrush Color="Transparent"/&gt;
      &lt;/DataGrid.RowBackground&gt;
      &lt;DataGrid.RowHeaderStyle&gt;
          &lt;Style TargetType="{x:Type DataGridRowHeader}"&gt;
              &lt;Setter Property="Background" Value="#FFFFFFC8"/&gt;
              &lt;Setter Property="BorderBrush" Value="DarkSlateGray"/&gt;
              &lt;Setter Property="BorderThickness" Value="2, 1"/&gt;
              &lt;Setter Property="FontWeight" Value="SemiBold"/&gt;
              &lt;Setter Property="Padding" Value="5"/&gt;
          &lt;/Style&gt;
      &lt;/DataGrid.RowHeaderStyle&gt;
      &lt;DataGrid.RowHeaderTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;TextBlock Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type DataGridRow}}, Path=Item.Day}"/&gt;
          &lt;/DataTemplate&gt;
      &lt;/DataGrid.RowHeaderTemplate&gt;
  &lt;/DataGrid&gt;
  </code></pre>
  
  <p>Bonus: how can I get a 2px border on the row/column headers where there's currently only a 1px border?</p>