title: cannot find Name of DataGridColumn programmatically
body: <p>I found the Columns collection in my datagrid, and was hoping to iterate through it to find a certain column Name. However, I can't figure out how to address the x:Name attribute of the column. This xaml illustrates my problem with a DataGridTextColumn and a DataGridTemplateColumn:</p>
  
  <pre><code>&lt;t:DataGrid x:Name="dgEmployees" ItemsSource="{Binding Employees}" 
      AutoGenerateColumns="false" Height="300" &gt;
      &lt;t:DataGrid.Columns&gt;
          &lt;t:DataGridTextColumn x:Name="FirstName" Header="FirstName"
  Binding="{Binding FirstName}" /&gt;
          &lt;t:DataGridTemplateColumn x:Name="LastName" Header="LastName" &gt;
              &lt;t:DataGridTemplateColumn.CellTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;TextBlock Text="{Binding LastName}" /&gt;
                  &lt;/DataTemplate&gt;
              &lt;/t:DataGridTemplateColumn.CellTemplate&gt;
          &lt;/t:DataGridTemplateColumn&gt;
      &lt;/t:DataGrid.Columns&gt;
  &lt;/t:DataGrid&gt;
  </code></pre>
  
  <p>And here is my code:</p>
  
  <pre><code>    DataGrid dg = this.dgEmployees;
      foreach (var column in dg.Columns) 
      {
          System.Console.WriteLine("name: " + (string)column.GetValue(NameProperty));
      }
  </code></pre>
  
  <p>At runtime, no value is present; column.GetValue doesn't return anything. Using Snoop, I confirmed that there is no Name property on either DataGridTextColumn or DataGridTemplateColumn. </p>
  
  <p>What am I missing?</p>