WPF DataGrid动态生成列的单元格背景色绑定
时间:2020-01-06 12:55:58
收藏:0
阅读:256
原文:WPF DataGrid动态生成列的单元格背景色绑定
<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第一列的单元格背景色根据值改变。
原文:https://www.cnblogs.com/lonelyxmas/p/12155411.html
评论(0)