How to add event description in my custom component

I have created some custom events in my own custom component.  
I want people who use my component to see the event description when theyclick onthe event in the properties window.
I think you do something like [  ] above the event but i cant find examples.
Please help.
joshuadavidleeAsked:
Who is Participating?
 
aaronfengCommented:
Oops, I forgot to answer your question, if you want the description to show up for your event do this:

[Description("This is the description for your event")]
public event EventHandler YourEvent;

When you go to the event property window, you should see YourEvent in it and the description will show up on the bottom.

Cheers,

Aaron
0
 
aaronfengCommented:
If you want your property to be shown in the designer if need to use the Browsable attribute.  If you want the event to be shown in a component you can just declare an event like normal, it will show up in the property event section.  I just tried it on an IExtenderProvider component, I was able to see the event.

Cheers,

Aaron
http://aaronfeng.blogspot.com/
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.