protected override void OnLayout(LayoutEventArgs e) { System.Console.WriteLine("OnLayout: {0}x{1}", Size.Width, Size.Height); base.OnLayout(e); if (doneInitLayout) { _backbuff = new BackBuffer(Size); _backbuff.size = Size; GetBitmaps(); Graphics g = _backbuff.GetGraphics(); g.DrawImageUnscaled(bmpProgressBar[0], 0, 0); _backbuff.DisposeGraphics(); } }