<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Column.DisplayIndex}" Value="1"> <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource Self}, Path=Content.Text,
Converter={StaticResource cellBackgroundConvert}}"/> </DataTrigger>
上面的是datagrid第一列的單元格背景色根據值改變。