I wrote a easy program: one standard form. Next I define a paint method for this form:
Code:
bool cl = true;
private void Form1_Paint(object sender, PaintEventArgs e)
{
Brush c;
if (cl)
c = new SolidBrush(Color.Gray);
else
c = new SolidBrush(Color.Green);
cl = !cl;
e.Graphics.FillRectangle(c, new Rectangle(0,0,Width,Height));
}
So by every screen redraw shoud be one time gray, one time green background. But, when I i.e. change a form size, I see that not full form is redraw everytime, that I have a "zebra" effect (look attachment)
How to force, that always all will be redraw ?
THNX in advance
Olek
p.s.
I know, that I can a set a background property for have always same color. THis is not a problem. Problem is with paint somthink else, not only a background. I know also that I can put a Refresh at Resize, but this is also no solution for me - important is for my program not to redraw double.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.