如何设置透明背景DataGrid
?
以下无效:
<DataGrid Background="Transparent" >
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="Background" Value="Transparent"/>
</Style>
</DataGrid.CellStyle>
</DataGrid>
使用此代码,它像雪一样保持白色:)
编辑:
更新了代码(复制粘贴问题)
您还需要将设置RowBackground
为Transparent
:
<DataGrid Background="Transparent" RowBackground="Transparent">
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句