Hiding unwanted properties in custom controls

前端 未结 5 1072
一向
一向 2020-11-27 22:53

Is this the way to hide properties in derived controls?

public class NewButton : Button

...

[Browsable ( false )]
public new Con         


        
5条回答
  •  再見小時候
    2020-11-27 23:17

    No, you can remove them from the designer (as shown) but you cannot really hide them form code as that would violate the substitution principle. It has been asked & answered many times here, see for example this SO question.

提交回复
热议问题