I continue to create a lot of custom webparts for SharePoint 2010. I found a better way to automatically disable Chrome in your c# webpart class.
public override PartChromeType ChromeType
{
get { return PartChromeType.None; }
set { base.ChromeType = PartChromeType.None; }
}
I started using this method because in my advanced webparts where I use and EditorPart to handle webpart options; I hide all the other webpart options. To hide the default webpart options I use the following code.
base.Parent.Controls[2].Visible = false;
This is an update of an earlier post.
