title: How to apply unique styles to individual cells in a datagrid in XAML w/o codebehind
body: <p>I found this solution here <a href="https://stackoverflow.com/questions/5549617/change-datagrid-cell-colour-based-on-values/5551986#5551986">Change DataGrid cell colour based on values</a> but want to take it down another level so that I can have different conditions for changing the color for each cell and assume the most straightforward way would be to apply different styles to each single cell.</p>
  
  <p>In short, what is the XAML to access a singular cell in a datagrid?</p>
  
  <p><strong>UPDATE</strong>: At suggestion below (@OmegaMan) found this: <a href="https://stackoverflow.com/questions/32885623/how-can-i-use-grid-row-property-as-a-databinding-path-for-a-multidatatrigger-con">How can I use Grid.Row Property as a DataBinding Path for a MultiDataTrigger Condition?</a></p>
  
  <pre><code>&lt;Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=      (Grid.Row)}" Value="2"/&gt; 
  </code></pre>
  
  <p>but am stuck on how to modify to make it refer to a datagrid column and row kind of like below</p>
  
  <pre><code>    &lt;Style x:Key="colorDataGridCellStyle" TargetType="{x:Type DataGridCell}"&gt;
          &lt;Setter Property="Background" Value="AntiqueWhite" /&gt;
          &lt;Style.Triggers&gt;
              &lt;MultiDataTrigger&gt;
                  &lt;MultiDataTrigger.Conditions&gt;
                      &lt;Condition Property ="Column"
                     Value="2"/&gt;
                      &lt;Condition Property ="Row"
                     Value="2"/&gt;
                      &lt;Condition {the value of this particular cell (2,2) is between two values, thinking this will mostly have to be in the viewModel but maybe can have more here} /&gt;
                  &lt;/MultiDataTrigger.Conditions&gt;
                  &lt;Setter Property="Foreground" Value="Green" /&gt;
              &lt;/MultiDataTrigger&gt;
          &lt;/Style.Triggers&gt;
      &lt;/Style&gt;
  </code></pre>
  
  <p><strong>UPDATE 2</strong>
  I just found this which seems closer to what I need but I'm not sure how to modify to allow for making it specific to single cells.</p>
  
  <p><a href="https://social.msdn.microsoft.com/Forums/en-US/20816d3b-3db3-4fd3-bdf3-16420dc02745/how-do-i-change-a-datagrid-row-color-in-xaml-based-on-the-value-listed-in-code?forum=wpf" rel="nofollow noreferrer">How do I change a datagrid row color in XAML based on the value listed in code?</a></p>