protected override void OnPaint(PaintEventArgs eventArgs) { BasicWindow theWindow = (BasicWindow)Tag; Graphics theGraphics = eventArgs.Graphics; theWindow.DrawContent(eventArgs, theGraphics); }
protected override void OnResize(EventArgs eventArgs) // Note that OnResize is called when creating the window handle. { base.OnResize(eventArgs); BasicWindow theWindow = (BasicWindow)Tag; Graphics theGraphics = this.CreateGraphics(); theGraphics.Clear(Color.White); theWindow.DrawContent(eventArgs, theGraphics); }