开发者

Keep your filthy designer hands off my property values!

开发者 https://www.devze.com 2023-03-20 04:08 出处:网络
Is there an attribute I can set on my control\'s开发者_开发技巧 property to prevent the designer-generated code from ever setting a value to it?http://msdn.microsoft.com/en-us/library/system.component

Is there an attribute I can set on my control's开发者_开发技巧 property to prevent the designer-generated code from ever setting a value to it?


http://msdn.microsoft.com/en-us/library/system.componentmodel.designerserializationvisibilityattribute.aspx

This looks useful.


The BrowsableAttribute will remove it from the property grid, if you provide false to the constructor:

[Browsable(false)]

If you set it with a default value, this value won't be serialized by the designer:

[DefaultValue("MyDefaultValue")]
0

精彩评论

暂无评论...
验证码 换一张
取 消