问题很简单:如何实现 WPF 数据网格的条纹颜色,如下所示:
这会修改每一行以包含灰色背景,现在我需要改进它:
<Style TargetType="{x:Type DataGridCell}">
<Setter Property="Background" Value="#aaa" />
</Style>
最佳答案
您可以为此使用 DataGrid 的 AlternatingRowBackground 属性。
关于c# - 如何为 WPF DataGrid 制作条纹颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9723954/