This may not be an ideal solution, but you could try and set the ElementStyle for each column after they have been generated by hooking a handler to AutoGeneratedColumns
event.
This is what I tried:
Style
<Style TargetType="TextBlock" x:Key="ColumnStyle">
<Setter Property="HorizontalAlignment" Value="{Binding Path=Text, RelativeSource={RelativeSource Self}, Converter={StaticResource AlignmentConverter}}" />
</Style>
XAML for DataGrid
<DataGrid x:Name="dg"
ItemsSource="{Binding Items}"
AutoGenerateColumns="True"
AutoGeneratedColumns="Dg_OnAutoGeneratedColumns"
SelectionMode="Extended"/>
EventHandler Code (Code Behind)
void Dg_OnAutoGeneratedColumns(object sender, EventArgs e)
{
foreach (var dataGridColumn in dg.Columns)
{
var textColumn = dataGridColumn as DataGridTextColumn;
if (textColumn == null) continue;
textColumn.ElementStyle = FindResource("ColumnStyle") as Style;
}
}
If you do not like Code Behind, then you can always create an attached behavior to achieve the same result.