title: How to center text in a specific column in WPF ListView?
body: <p>I tried this and also HorizontalAlignment, instead of TextAlignment but they still show up aligned to left.</p>
  
  <pre><code>&lt;Window x:Class="EditorWindow.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          DataContext="{Binding RelativeSource={RelativeSource Self}}"
          Title="MainWindow" Height="800" Width="600"&gt;
      &lt;Grid&gt;
          &lt;ListView ItemsSource="{Binding Effects}"&gt;
              &lt;ListView.View&gt;
                  &lt;GridView&gt;
                      &lt;GridViewColumn Width="100" Header="Name" DisplayMemberBinding="{Binding Name}"  /&gt;
                      &lt;GridViewColumn Width="100" Header="Type" &gt;
                          &lt;GridViewColumn.CellTemplate &gt;
                              &lt;DataTemplate&gt;
                                  &lt;TextBlock Text="{Binding Type}" TextAlignment="Center"/&gt;
                              &lt;/DataTemplate&gt;
                          &lt;/GridViewColumn.CellTemplate&gt;
                      &lt;/GridViewColumn&gt;
                      &lt;GridViewColumn Width="100" Header="Opacity" DisplayMemberBinding="{Binding Opacity}" /&gt;
                  &lt;/GridView&gt;
              &lt;/ListView.View&gt;
          &lt;/ListView&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>