wpfxamldatagriddatagridcell

DataGridCell BorderBrush not working


I tried to set DataGridCell BorderBrush, but it looks like there is some other setting, which also sets border between cells.
Current Style:

<Style x:Key="DataGridCellStyle1" TargetType="{x:Type DataGridCell}">
    <Setter Property="BorderBrush" Value="Yellow"/>
</Style>

It looks like this:
Yellow and black border
I don't want that black border there. I want just the yellow border. Can someone please point me, where can I set the "black" border?


Solution

  • DataGrid has additional properties for grid lines

    try set Yellow color for both

    VerticalGridLinesBrush="Yellow"    
    HorizontalGridLinesBrush="Yellow"
    

    or hide them

    GridLinesVisibility="None"