title: WPF Unable to display Ellipse in DataGridTemplateColumn
body: <p>I have an Ellipse in a DataGridTemplateColumn, the data it is bound to displays correctly in the next column but my ellipse column is always empty, nothing displayed.</p>
  
  <pre><code>&lt;DataGridTemplateColumn CanUserResize="False" Header="StateEllipse"&gt;
      &lt;DataGridTemplateColumn.CellTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;StackPanel&gt;
                  &lt;Ellipse Fill="{Binding Path=State, Converter={StaticResource StateToBrush}}" Width="10" Height="10" /&gt;
                  &lt;TextBlock Text="{Binding Path=State}" /&gt;
              &lt;/StackPanel&gt;
          &lt;/DataTemplate&gt;
      &lt;/DataGridTemplateColumn.CellTemplate&gt;
  &lt;/DataGridTemplateColumn&gt;
  &lt;DataGridTextColumn Header="State" Binding="{Binding Path=State}" /&gt;
  </code></pre>
  
  <p>My Converter looks like this :</p>
  
  <pre><code>using System;
  using System.Globalization;
  using System.Windows.Data;
  using System.Windows.Media;
  
  namespace ThisNS.NS.Converter
  {
      [ValueConversion(typeof(int), typeof(Brush))]
      public sealed class StateToBrush : IValueConverter
      {
  
      #region IValueConverter Members
  
          public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
          {
              Color stateColor = Colors.Yellow;
              switch ((int)value)
              {
                  case 0:
                      stateColor = Colors.Green;
                      break;
                  case 1:
                      stateColor = Colors.Red;
                      break;
              }
              return new SolidColorBrush(Colors.Yellow);
          }
  
          public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
          {
              throw new NotImplementedException();
          }
  
      #endregion
      }
  }
  </code></pre>
  
  <p>My second column that displays the State value is ok but the first one with the ellipse is always empty.</p>
  
  <p><strong>The converter is never called, so the binding is never binded.</strong></p>
  
  <p>Somebody has an idea/suggestion?</p>
  
  <p>Thank you.</p>