How can I align the column data to center in a WPF DataGrid?
DataGrid
If you are using DataGridTextColumn you can use the following code snippet:
<Style TargetType="DataGridCell"> <Style.Setters> <Setter Property="TextBlock.TextAlignment" Value="Center" /> </Style.Setters> </Style>
1.4m articles
1.4m replys
5 comments
57.0k users