I created a Button descendant where I hide all the properties I don't use.
I do it like this:
[Browsable(false)]
[Bindable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Obsolete("", true)]
public new Boolean AllowDrop { get; set; }
Most properties get correctly hidden and cannot be used.
However there are two properties that I cannot get rid of.
Is there a way to also remove GenerateMember and Modifiers in the Designer?
Modifiers
andGenerateMember
are not actual properties of a control and are design-time properties, but you can remove them by creating a customDesigner
form control and overridingPostFilterProperties
like I did here. – Lou