Is it possible to remove a form property or set of properties from the Properties pane in Visual Studio?
Backstory: I’ve made some UserControls which inherit the common form properties, but I want to remove the “Anchor” and “Dock” properties from the Properties pane in Visual Studio, since the UserControl will be using different resizing logic, logic that anchoring and docking don’t seem to support.
I’m thinking it’s an annotation of some kind, but I’m not entirely sure, and I wasn’t able to find anything on Google.
Thanks in advance!
The attribute you want is Browsable
http://msdn.microsoft.com/en-us/library/system.componentmodel.browsableattribute.browsable.aspx
override Dock and Anchor on those user controls, add that attribute (with a “false” value) to them and see if that works (make sure you recompile in order for the designer to load the changes)