Disable DataGrid current cell border in FullRow selection mode

后端 未结 7 906
走了就别回头了
走了就别回头了 2020-12-24 00:19

I am using a DataGrid in row selection mode (i.e., SelectionUnit=\"FullRow\"). I simply want to remove the border that is being placed around the current cell w

相关标签:
7条回答
  • 2020-12-24 01:15

    The real answer is:

    <!-- put it in your cell style -->
    <DataTrigger Binding="{Binding SelectionUnit, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Value="FullRow">
        <Setter Property="BorderThickness" Value="0" />
    </DataTrigger>
    

    The question was about disabling it only in FullRow selection mode but other answers provide a solution to disable it completely even in cell selection mode.

    Answer to a very old question but believe it or not WPF and WinForms is still used nowadays.

    0 讨论(0)
提交回复
热议问题