I have a datagrid which auto generates the columns.
<DataGrid Name="QueryGrid" AutoGenerateColumns="True" Height="1000" Width="1135" ItemsSource="{Binding QueryTable}" Visibility="{Binding Path=QueryGridVisiblity, Converter={StaticResource BoolToVis}}" />
I have to make the column names bold. How do i do this? Any suggestions?
Regards, Sagar
Here is the answer i have found:
<DataGrid Name="QueryGrid" AutoGenerateColumns="True" Height="900" Width="1135" ItemsSource="{Binding QueryTable}" Visibility="{Binding Path=QueryGridVisiblity, Converter={StaticResource BoolToVis}}">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
</DataGrid.ColumnHeaderStyle>
</DataGrid>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With