title: Setting different alignments for listview columns
body: <p>I'm having trouble drawing a listview with columns that are left or centre aligned. I've looked at a few of solutions that I've found on here or other forums but they either seem to work for <a href="https://stackoverflow.com/questions/4883182/content-alignment-for-gridviewcolumn-in-the-listview?rq=1">all columns</a> or I can't get them working. </p>
  
  <p>The best I've got so far is this code, but everything is left aligned (I've put the right-aligns in to test the code). Can someone tell me where I'm going wrong please?</p>
  
  <pre><code>&lt;ListView Name="lsvQuestions" DockPanel.Dock="Bottom"&gt;                
       &lt;ListView.View&gt;
           &lt;GridView&gt;
               &lt;GridViewColumn Width="450" Header="Question Text"&gt;
                   &lt;GridViewColumn.CellTemplate&gt;
                       &lt;DataTemplate&gt;
                           &lt;TextBlock Text="{Binding QuestionText}" TextAlignment="Left"/&gt;
                       &lt;/DataTemplate&gt;
                   &lt;/GridViewColumn.CellTemplate&gt;
                   &lt;/GridViewColumn&gt;
                   &lt;GridViewColumn Width="200" Header="Type"&gt;
                      &lt;GridViewColumn.CellTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;TextBlock Text="{Binding QuestionType}" TextAlignment="Right"/&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/GridViewColumn.CellTemplate&gt;
                   &lt;/GridViewColumn&gt;
                   &lt;GridViewColumn Width="100" Header="Page Number"&gt;
                       &lt;GridViewColumn.CellTemplate&gt;
                           &lt;DataTemplate&gt;
                               &lt;TextBlock Text="{Binding QuestionPageNumber}" TextAlignment="Center"/&gt;
                           &lt;/DataTemplate&gt;
                       &lt;/GridViewColumn.CellTemplate&gt;
                   &lt;/GridViewColumn&gt;
                   &lt;GridViewColumn Width="100" Header="Order"&gt;
                      &lt;GridViewColumn.CellTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;TextBlock Text="{Binding QuestionOrder}" TextAlignment="Center"/&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/GridViewColumn.CellTemplate&gt;
                  &lt;/GridViewColumn&gt;
              &lt;/GridView&gt;
          &lt;/ListView.View&gt;               
      &lt;/ListView&gt;
  </code></pre>