title: DataGrid different first column
body: <p>I have a <code>WPF</code> app. I use <code>Mahapps.Metro</code>. The main control on the main window is a <code>DataGrid</code>. I wanted it to be a table, but I wanted column headers and first cell in every row to have a slightly different style. For now it looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/z25MO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/z25MO.png" alt="enter image description here"></a></p>
  
  <p>So column headers are fine. But now I want the first cell in every row to be special, like column headers (bigger font, bold, maybe a vertical border line, like the horizontal one). Is there a way to do it? (remembering the fact, that I add every column and row in code, not in XAML).</p>
  
  <p>For now my XAML code looks like this:</p>
  
  <pre><code>&lt;Controls:MetroWindow x:Class="StateMachines.MainWindow"
                        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                        xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
                        Title="Maszyny Mealy'ego i Moora"
                        Height="450"
                        Width="800"&gt;
      &lt;Controls:MetroWindow.RightWindowCommands&gt;
          &lt;Controls:WindowCommands&gt;
              &lt;Button Content="settings" /&gt;
              &lt;Button&gt;
                  &lt;StackPanel Orientation="Horizontal"&gt;
                      &lt;Rectangle Width="20"
                                 Height="20"
                                 Fill="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}"&gt;
                          &lt;Rectangle.OpacityMask&gt;
                              &lt;VisualBrush Stretch="Fill" Visual="{StaticResource appbar_cupcake}" /&gt;
                          &lt;/Rectangle.OpacityMask&gt;
                      &lt;/Rectangle&gt;
                      &lt;TextBlock Margin="4 0 0 0"
                                 VerticalAlignment="Center"
                                 Text="do something" /&gt;
                  &lt;/StackPanel&gt;
              &lt;/Button&gt;
          &lt;/Controls:WindowCommands&gt;
      &lt;/Controls:MetroWindow.RightWindowCommands&gt;
      &lt;DataGrid x:Name="DataGridLogic" Margin="318,59,0,136" Width="452" RenderTransformOrigin="0.657,1.249"
                ItemsSource="{Binding Path=Logic.DefaultView}" ColumnWidth="*" CanUserReorderColumns="False"
                CanUserResizeColumns="False" CanUserAddRows="False"  CanUserSortColumns="False" CanUserResizeRows="False"&gt;
          &lt;DataGrid.ColumnHeaderStyle&gt;
              &lt;Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource MetroDataGridColumnHeader}"&gt;
                  &lt;Setter Property="HorizontalContentAlignment" Value="Center" /&gt;
              &lt;/Style&gt;
          &lt;/DataGrid.ColumnHeaderStyle&gt;
          &lt;DataGrid.RowHeaderStyle&gt;
              &lt;Style TargetType="{x:Type DataGridRowHeader}" BasedOn="{StaticResource MetroDataGridRowHeader}"&gt;
                  &lt;Setter Property="HorizontalContentAlignment" Value="Center" /&gt;
              &lt;/Style&gt;
          &lt;/DataGrid.RowHeaderStyle&gt;
          &lt;DataGrid.CellStyle&gt;
              &lt;Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource MetroDataGridCell}"&gt;
                  &lt;Setter Property="HorizontalContentAlignment" Value="Center" /&gt;
              &lt;/Style&gt;
          &lt;/DataGrid.CellStyle&gt;
      &lt;/DataGrid&gt;
  &lt;/Controls:MetroWindow&gt;
  </code></pre>