Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 161
  • Last Modified:

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.
0
joshuadavidlee
Asked:
joshuadavidlee
  • 2
1 Solution
 
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
 
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now