WPF DataGrid change cell value based on underlying data object
XAML <Window x:Class=" DataGridCellBackground.MainWindow " xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml " xmlns:DataGridCellBackground=" clr-namespace:DataGridCellBackground " Title=" MainWindow " Height=" 350 " Width=" 525 " DataContext=" {Binding RelativeSource={RelativeSource Self}} "> <Window.Resources> <DataGridCellBackground:DataGridCellValueConverter x:Key=" dataGridCellValueConverter "/> </Window.Resources> <Grid> <DataGrid ItemsSource=" {Binding Data} " Width=" 400 " Height=" 200 " CanUserAddRows=" False "> <DataGrid.CellStyle> <Style TargetType=" {x:Type DataGridCell} "> <Setter Property=" Template "> <Setter.Value...