title: WPF datagrid column color dynamic binding on a single Value
body: <p>I have a datagrid and would like to have one of the columns' background color dynamically linked to a single value from the background code.  I don't want to add a list of value to my ObservableCollection for the datagrid for binding the background color since I only need one color for an entire column (the color needs to change based on a value not related to the datagrid datacontext).</p>
  
  <p>I've looked around, it seemed that most of the discussion is about change the cell background color based on the value displayed.</p>
  
  <p>Thank you.</p>
  
  <p>Here is my xmal code for the datagrid column....</p>
  
  <pre><code>   &lt;DataGrid.Columns&gt;
                  &lt;DataGridTextColumn Header="Fleet" Width = "100*" IsReadOnly="True" Binding="{Binding Fleet,UpdateSourceTrigger=PropertyChanged}"&gt;
                      &lt;DataGridTextColumn.CellStyle&gt;
                          &lt;Style TargetType="DataGridCell"&gt;
                              &lt;EventSetter Event="MouseLeftButtonDown" Handler="FleetDataGridCell_MouseLeftButtonDown" /&gt;
                              &lt;EventSetter Event="KeyDown" Handler="FleetDataGridCell_KeyDown" /&gt;
                              &lt;Setter Property="Background" Value="{Binding}"/&gt;
  
                          &lt;/Style&gt;
                      &lt;/DataGridTextColumn.CellStyle&gt;
  </code></pre>
  
  <p></p>