This is my Datagrid, how can i establish that the Columns have all the same distance between them, so that the columns header don't peck so like the second or third column...
XAML:
<Style x:Key="Datag1" TargetType="DataGrid">
<Setter Property="ColumnHeaderStyle" Value="{DynamicResource chs1}"></Setter>
</Style>
<Style x:Key="chs1" TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="Brown"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="15"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="LightGray"></Setter>
</Trigger>
</Style.Triggers>
</Style>
<DataGrid Name="DataGridView" Style="{DynamicResource Datag1}" Margin="0,105,0,0" FontSize="15" CanUserSortColumns="True"
Background="Azure" RowBackground="Aqua" AlternatingRowBackground="DarkGray" ColumnHeaderHeight="45" Foreground="Brown"
CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeColumns="True" CanUserReorderColumns="False" BorderBrush="Black">
</DataGrid>
EDIT:
Best solution: "you better set the AutoGenerateColumns property of the DataGrid to false and explicitly define each column and set an individual width for each one in your XAML markup. See my edited answer for an example." – mm8
Much thanks you all!