title: Text alignment in DataGrid
body: <p>I'm programming by WPF. I need a way to make center content of cells, in DataGrid control. I use this code also:</p>
  
  <pre><code>&lt;DataGrid x:Name="dg1" HorizontalAlignment="Left" Margin="10,10,0,0"
      VerticalAlignment="Top" Height="360" Width="498"
      FontFamily="2  Badr" FontSize="18" 
      AlternatingRowBackground="LightCoral" FlowDirection="RightToLeft"
      HorizontalContentAlignment="Center" VerticalContentAlignment="Center" 
      Background="{x:Null}"/&gt;
  </code></pre>
  
  <p>What is wrong?</p>