开发者

Why properties you add to a custom .NET user control appear bold in propertygrid?

Usually, only modified control properties are bold.

But in this scenario, I've created a custom user control and add开发者_运维百科ed a public property to it. When I add it to any container and open the properties window, all properties I've added appear also bold - despite the default value.

Why does this happen and how to prevent it?


Try to add the DefaultValueAttribute to the properties and set it to the value that you don't want to appear bold.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜