title: Scale down a Bitmap in WPF with best quality
body: <p>How can I convert this GDI code to WPF code?</p>
  
  <pre><code>Icon bigIcon32x32 = null;
                      bigIcon32x32 = Icon.ExtractAssociatedIcon("c:\\test.docx");                    
  
                      Bitmap bm = bigIcon32x32.ToBitmap();
  
                      Bitmap thumb16x16 = new Bitmap(16, 16);
                      Graphics graphics = Graphics.FromImage(thumb16x16);
                      graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
                      graphics.DrawImage(bm, new Rectangle(0, 0, 16, 16), new Rectangle(0, 0, bm.Width, bm.Height), GraphicsUnit.Pixel);
  
                      graphics.Dispose();
                      bm.Dispose(); 
                      thumb16x16.Dispose(); 
  </code></pre>
  
  <p>It seems I have to use the ToBitmap() methode but from then on I want to use WPF only.</p>
  
  <p>In the end I want to display small 16x16 pixel Images in a WPF DataGrid`s Column via Binding.</p>