title: set height of icon Image template programatically
body: <p>I have one column in my datagrid which contains Icons.
  for this I have one celltemplate added to column programatically.</p>
  
  <pre><code>var imageFactory = new FrameworkElementFactory(typeof(System.Windows.Controls.Image));
                      imageFactory.SetBinding(System.Windows.Controls.Image.SourceProperty, imageBinding);
                      imageFactory.SetValue(System.Windows.Controls.Image.StretchProperty, Stretch.None);
                      if (config.Font != null)
                      {
                          double height = config.Font.Size;
                          imageFactory.SetValue(FrameworkElement.HeightProperty, height);
  
                      }
                      var dataTemplate = new DataTemplate { VisualTree = imageFactory };
                      statusColumn.CellTemplate = dataTemplate;
                      view.DataGrid.Columns.Add(statusColumn);
  </code></pre>
  
  <p>when I set Height property externally it <strong>crops the image</strong> instead of resizing image to 'height' value.</p>
  
  <p>how to set image height to specific value.
  please suggest.</p>