468,736 Members | 2,018 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,736 developers. It's quick & easy.

How to set the description of user control's property

Hi, everyone.
I am writting an user control. There has some properties on it. At the
design time, the properties will disply on the property windows and user
could change it's value after selected the property item. My problem is when
someone select the property item on the property window. There has no
description about the user control property at the bottom of property window.
It just show the property name on it.
I think it must through some attribute to set description of the
property. Is that true? How can I set the user control property's description
when I writting the user control?
And sometimes control has it's owen property page (or property window)
at the design time. How can I do for that?
Thanks!

Steven.Xu
10.2004
Nov 16 '05 #1
1 10830
You need to add a Description attribute on your properties

[Description("My Description")]
public int MyIntProperty
{
get {..}
set {..}
}

This is a great design time article:

http://www.awprofessional.com/articl...y.asp?p=169528

"Steven.Xu" <St******@discussions.microsoft.com> wrote in message
news:43**********************************@microsof t.com...
Hi, everyone.
I am writting an user control. There has some properties on it. At the design time, the properties will disply on the property windows and user
could change it's value after selected the property item. My problem is when someone select the property item on the property window. There has no
description about the user control property at the bottom of property window. It just show the property name on it.
I think it must through some attribute to set description of the
property. Is that true? How can I set the user control property's description when I writting the user control?
And sometimes control has it's owen property page (or property window) at the design time. How can I do for that?
Thanks!

Steven.Xu
10.2004

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by martin | last post: by
4 posts views Thread by louise raisbeck | last post: by
1 post views Thread by John Keenan | last post: by
1 post views Thread by Nathan Sokalski | last post: by
reply views Thread by zhoujie | last post: by
xarzu
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.