You should add magic
string:
<SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="Transparent" />
in your resources, for example in <Window.Resources>
.
In this case, when IsEditing="True"
color is assigned by default (White
), which is taken from the SystemColors
. But then you need to explicitly set the color for the main panel or for Window
.
Or set this string in <DataGrid.Resources>
with Background="White"
:
<DataGrid Background="White" ...>
<DataGrid.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="Transparent" />
</DataGrid.Resources>
...
</DataGrid>