开发者

Keep your filthy designer hands off my property values!

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜