If you set the Block.TextAlignment property to Center on the DataGrid, it will be inherited by the TextBlocks and TextBoxes used in DataGridTextColumns and will center the text:
<WpfToolkit:DataGrid
Block.TextAlignment="Center"
AutoGenerateColumns="True"
Margin="15,15,10,65"
Name="DG1"
CanUserReorderColumns="False" />
If you want to align text in the cells but not in the headers or elsewhere in the Grid, you can set the property on the DataGridCell using CellStyle:
<WpfToolkit:DataGrid
AutoGenerateColumns="True"
Margin="15,15,10,65"
Name="DG1"
CanUserReorderColumns="False">
<WpfToolkit:DataGrid.CellStyle>
<Style TargetType="WpfToolkit:DataGridCell">
<Setter Property="Block.TextAlignment" Value="Center"/>
</Style>
</WpfToolkit:DataGrid.CellStyle>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…