Live Chat Icon For mobile
Live Chat Icon

Why does my transparent Panel whose parent has a gradient background flicker a lot when resized?

Platform: WinForms| Category: Drawing Tips

Make sure to set these flags for your panel, in it’s constructor (for example).
You will have to derive a class from Panel otherwise if you were initially using the Panel directly.

class NonFlickerPanel : Panel
	public NonFlickerPanel()
		SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint,true);

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.