【发布时间】:2017-10-13 20:10:45
【问题描述】:
我正在努力寻找一种方法来完成这项工作:
<DataGrid x:Name="name" CanUserAddRows="false"
IsReadOnly="true" ItemsSource="{Binding}">
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="Red"/>
</Style>
</DataGrid.CellStyle>
</DataGrid>
我只是想改变单元格边框的颜色,为什么要这么复杂? :/
【问题讨论】:
-
“不工作”很难解释。它是否以您可以描述的任何特定方式失败?
-
边框单元格保持黑色