title: Using image in bool-type column when using AutoGenerateColumn (WPF)
body: <p>I have </p>
  
  <pre><code>if (e.PropertyType == typeof(bool))
          {             
             e.Column.Header = "Status";
             DataGridTemplateColumn templateColumn = new DataGridTemplateColumn();
             templateColumn.Header = "Status";
             DataTemplate imageTemplate = new DataTemplate();
  
             DataTrigger imageBoolTrigger = new DataTrigger();
             Converter.BoolToImage boolToImage = new Converter.BoolToImage();
  
             Uri trueImageURI = new Uri(@"pack://application:,,,/MonitorView_wpf;component/Images/Icons/check-mark-16.png", UriKind.RelativeOrAbsolute);
  
             boolToImage.TrueImage.Source = new BitmapImage(trueImageURI);
  
             imageBoolTrigger.Binding = new Binding { Converter = boolToImage, ConverterParameter = e.Column };
  
             imageTemplate.Triggers.Add(imageBoolTrigger);
             templateColumn.CellTemplate = imageTemplate;
  
             e.Column = templateColumn;
  
          }
  </code></pre>
  
  <p>but alas, its not working.</p>
  
  <p>how do I use an image instead of the autogenerated checkbox?</p>
  
  <p>my converter looks like this:</p>
  
  <pre><code> public class BoolToImage : IValueConverter
      {
          public Image TrueImage { get; set; }
          public Image FalseImage { get; set; }
  
          public object Convert(object value, Type targetType, object parameter,
              System.Globalization.CultureInfo culture)
          {
              if (!(value is bool))
              {
                  return null;
              }
  
              bool b = (bool) value;
              if (b)
              {
                  return this.TrueImage;
              }
              else
              {
                  return this.FalseImage;
              }
          }
  
          public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
          {
              throw new NotImplementedException();
          }
      }
  </code></pre>
  
  <p>my image does exist in the assemby, it's a png - ive tried all sorts of things, but never working.</p>
  
  <p>thanks in advance</p>