
How do you stop the Designer generating code for public properties on a User Control?如何阻止设计器自动生成为用户控件上的公共属性设置值的代码? 在要从设计器序列化中隐藏的属性上使用DesignerSerializationVisibilityAttribute,并将参数设置为Hidden。
将以下属性添加到控件中的属性:
我正在使用VS 2013,对Erik的回答略有更改。
|
How do you stop the Designer generating code for public properties on a User Control?如何阻止设计器自动生成为用户控件上的公共属性设置值的代码? 在要从设计器序列化中隐藏的属性上使用DesignerSerializationVisibilityAttribute,并将参数设置为Hidden。
将以下属性添加到控件中的属性:
我正在使用VS 2013,对Erik的回答略有更改。
|