Esempio n. 1
0
 private void MakeThumbnail(string path)
 {
     try
     {
         var thumbnail = Template.FindName("Thumbnail", this) as Rectangle;
         var bmp       = new Bitmap(Path);
         thumbnail.Fill = new ImageBrush(MagicLaboratory.ImageSourceForBitmap(bmp));
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
Esempio n. 2
0
 private void MakeThumbnail()
 {
     try
     {
         var thumbnail = Template.FindName("Thumbnail", this) as Rectangle;
         var icon      = System.Drawing.Icon.ExtractAssociatedIcon(Path);
         var bmp       = icon.ToBitmap();
         thumbnail.Fill = new ImageBrush(MagicLaboratory.ImageSourceForBitmap(bmp));
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }