How do I hide some of the default control properties at design-time (C#)?

后端 未结 4 783
情深已故
情深已故 2021-01-04 10:56

I have a custom control that I made. It inherits from System.Windows.Forms.Control, and has several new properties that I have added. Is it possible to show m

4条回答
  •  星月不相逢
    2021-01-04 11:49

    Override the property and add [Browsable(false)].

    You might also want to add [EditorBrowsable(EditorBrowsableState.Never)], which will hide the property in IntelliSense in the code editor. Note that it will only be hidden in a separate solution from the original control.

提交回复
热议问题