title: Display both image and label in DataGrid column header
body: <p>I have a <code>DataGrid</code> and previously I was only displaying Image/Icon in the column header using the following <code>Style</code>.</p>
  
  <pre><code>            &lt;Style  TargetType="DataGridColumnHeader" &gt;
                  &lt;Setter Property="ContentTemplate" &gt;
                      &lt;Setter.Value&gt;
                          &lt;DataTemplate &gt;
                              &lt;StackPanel Orientation="Horizontal"&gt;
                                  &lt;Image Source="{Binding Converter={StaticResource StrToImageConverter}}" /&gt;
                              &lt;/StackPanel&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/Setter.Value&gt;
                  &lt;/Setter&gt;
              &lt;/Style&gt;
  </code></pre>
  
  <p>I am passing the image path as column name in my <code>DataTable</code> </p>
  
  <pre><code>    string colName; // Some file path
      DataColumn c = new DataColumn(colName) { DataType = typeof(string) };
      dt.Columns.Add(c);
  </code></pre>
  
  <p>and <code>StrToImageConverter</code> converts it to bitmap.</p>
  
  <pre><code>    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          ImageSource result = null;
          string path = (string)value;
  
          if (!string.IsNullOrEmpty(path))
              result = new BitmapImage(new Uri(path));
  
          return result;
      }
  </code></pre>
  
  <p>But now I also have to display the column name as text along with the icon. I can add a <code>TextBlock</code> in the <code>StackPanel</code> next to image but I'm not sure how to pass data to it or is it even the best approach.</p>
  
  <p>Any help would be really appreciated.</p>
  
  <p>Thanks</p>