0
如何在DataGridCell.IsEditing爲true時更改DataGridRow顏色?如何在DataGridCell.IsEditing爲true時更改DataGridRow顏色?
當用戶雙擊單元格時,它突出顯示文本並取消選擇整行(即:將行顏色更改爲透明)。只應該突出顯示當前選中的內容,以及在編輯後用戶失去焦點或離開該字段時,該行可以再次突出顯示,具體取決於光標所在的行。
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Style.Triggers>
<Trigger Property="DataGridCell.IsEditing" Value="True">
<Setter Property="BorderThickness" Value="3" />
<Setter Property="BorderBrush" Value="DarkBlue" />
//Change DataGridRow BackGroudCorlor to transparent.
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>