title: How can I center a Silverlight DataGridTemplateColumn header?
body: <p>I want to center the header on a Silverlight DataGridTemplateColumn. The following code gets me most of the way there:</p>
  
  <pre><code>DataGridTemplateColumn column = new DataGridTemplateColumn();
  column.CellTemplate = Resources[templateName] as DataTemplate;
  column.Header = headerName;
  column.HeaderStyle = new Style { TargetType = typeof(DataGridColumnHeader) };
  column.HeaderStyle.Setters.Add(new Setter(DataGridColumnHeader.HorizontalAlignmentProperty, HorizontalAlignment.Center));
  </code></pre>
  
  <p>The header is, indeed, centered, but if the column is expanded, the header doesn't stretch. It just remains it's original width, leaving white gaps on either side of it, which looks terrible.</p>
  
  <p>What is the proper way to center the column header, such that it still occupies the full width?</p>