I would like to customize the style of the user cell so that it does not have borders on all the states: selected / not selected. I wrote the following style:
<DataGrid.Resources> <Style TargetType="DataGridCell" x:Key="borderNone"> <Setter Property="BorderThickness" Value="0" /> </Style> </DataGrid.Resources> It works almost as it should. Namely, removes the boundary of the selection cell. But, the following problem remains:
This is the black border on the right and bottom of the cell. Visible in all states. How to remove it? Thank. Just in case, the complete table code (this cell is own, customized):
<DataGrid Name="thread1" AutoGenerateColumns="False" CanUserAddRows="False" Background="White" IsReadOnly="true" Width="300" Height="443" VerticalAlignment="Top" HorizontalAlignment="Left" HeadersVisibility="Column"> <DataGrid.Resources> <Style TargetType="DataGridCell" x:Key="borderNone"> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Padding" Value="0" /> <Setter Property="Margin" Value="0" /> <Setter Property="Background" Value="Transparent"/> </Style> </DataGrid.Resources> <DataGrid.Columns> <DataGridTemplateColumn Header="Поток №1" Width="*" CellStyle="{StaticResource borderNone}"> <DataGridTemplateColumn.HeaderStyle> <Style TargetType="DataGridColumnHeader"> <Setter Property="HorizontalContentAlignment" Value="Center" /> </Style> </DataGridTemplateColumn.HeaderStyle> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <DataGrid ItemsSource="{Binding DataThreadsAll}" AutoGenerateColumns="False" CanUserAddRows="False" IsReadOnly="true" HeadersVisibility="Column" BorderThickness="0"> <DataGrid.Columns> <DataGridTextColumn Width="*" Header="Ri" Binding="{Binding Ri}" /> <DataGridTextColumn Width="*" Header="Zi" Binding="{Binding Zi}" /> <DataGridTextColumn Width="*" Header="Tk" Binding="{Binding Tk}" /> </DataGrid.Columns> </DataGrid> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> </DataGrid.Columns> </DataGrid> 
HorizontalGridLinesBrush="Transparent" VerticalGridLinesBrush="Transparent", well, orGridLinesVisibility="None"at the first grid - EvgeniyZ