Live Chat Icon For mobile
Live Chat Icon

How do I prevent the Designer-Grid from being drawn on my Container Control during design-time?

Platform: WinForms| Category: Custom Designers

You can do so by overriding the DrawGrid property in your custom designer:


public class MyContainerDesigner : ParentControlDesigner
{
	protected override /*ParentControlDesigner*/ bool DrawGrid 
	{ 
		get
		{
			if (!this.disableDrawGrid)
				return base.DrawGrid;
			else
				return false;
		}
	}
}

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

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

Please submit your question and answer.