WPF 实现DataGrid行鼠标经过、点击时的背景、文字、行高等样式
直接上代码(不解释):
<DataGrid.RowStyle >
<Style TargetType="DataGridRow">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FFF1FAFF"/>
<Setter Property="FontSize" Value=" 20"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Foreground" Value="Blue"/>
</Trigger>
</Style.Triggers>
</Style>www.zzzyk.com
</DataGrid.RowStyle>
<DataGrid.CellStyle >
<Style TargetType="DataGridCell">
<Style.Triggers >
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#FFF1FAFF"/>
<Setter Property="FontSize" Value=" 20"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Foreground" Value="Blue"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>
补充:Web开发 , ASP.Net ,