title: UWP Community Toolkit DataGrid control : how to align cell content to right
body: <p>I have a numeric column in a <a href="https://docs.microsoft.com/en-us/windows/communitytoolkit/controls/datagrid" rel="nofollow noreferrer">DataGrid</a> I want its content be right-aligned. I have <a href="https://docs.microsoft.com/en-us/windows/communitytoolkit/controls/datagrid_guidance/" rel="nofollow noreferrer">read the docs</a>, mostly <a href="https://docs.microsoft.com/en-us/windows/communitytoolkit/controls/datagrid_guidance/styling_formatting_options#4-customizable-templates-and-styling-for-cells-rows-and-headers" rel="nofollow noreferrer">Customizable templates and styling for cells, rows and headers</a> where I ended up with this code to accomplish right-align cell content:</p>
  
  <pre><code>&lt;controls:DataGrid.CellStyle&gt;
      &lt;Style TargetType="controls:DataGridCell"&gt;
          &lt;Style.Setters&gt;
              &lt;Setter Property="HorizontalAlignment" Value="Right"/&gt;
          &lt;/Style.Setters&gt;
      &lt;/Style&gt;
  &lt;/controls:DataGrid.CellStyle&gt;
  </code></pre>
  
  <p>As is to be expected, this code really does what I want, but with all the cells. I want only the numeric column to have this property, and only it, but I have been unable to accomplish this.</p>
  
  <p>What am I doing wrong?</p>