コード例 #1
0
 public virtual void SetBackground(string imagePath, ContentStretch stretch)
 {
     BackgroundHexCode = null;
     Backer            = new ImageControl {
         Size = Size.ToSize(), Stretch = stretch,
     };
     Backer.Loaded  += (o, ev) => Redraw();
     Backer.FilePath = imagePath;
 }
コード例 #2
0
 protected override void Dispose(bool disposing)
 {
     if (CellBitmap != null)
     {
         var bit = CellBitmap;
         Bitmaps.Remove(this);
         mem -= bit.Width * bit.Height * 4;
         bit.Dispose();
     }
     if (Backer != null)
     {
         Backer.Dispose();
         Backer = null;
     }
     base.Dispose(disposing);
 }