Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove the border from a selected cell in a row in datagrid

Tags:

styles

wpf

xaml

As you can see in the picture around Jesse Furher is a black border line, how can i remove that line for all cells?

example

like image 206
Sas Gabriel Avatar asked Jul 22 '12 13:07

Sas Gabriel


1 Answers

Add this style in your DataGrid Resources and the selection border will be gone -

<DataGrid>
  .
  .
  <DataGrid.Resources>
    <Style TargetType="DataGridCell">
      <Setter Property="BorderThickness" Value="0"/>
      <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
  </DataGrid.Resources>
  .
  .
</DataGrid>
like image 85
Rohit Vats Avatar answered Nov 20 '22 02:11

Rohit Vats