Esempio n. 1
0
        protected override void OnPaint(PaintEventArgs eventArgs)
        {
            BasicWindow theWindow = (BasicWindow)Tag;

            Graphics theGraphics = eventArgs.Graphics;

            theWindow.DrawContent(eventArgs, theGraphics);
        }
Esempio n. 2
0
        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);
        }