How to add event description in my custom component

Posted on 2006-05-30
Last Modified: 2010-08-05
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.
Question by:joshuadavidlee
    LVL 5

    Expert Comment

    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.


    LVL 5

    Accepted Solution

    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.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Live - One-on-One C# Help from Top Experts

    Solve your toughest problems, fast.
    C# experts are online now and ready to help you.

    Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now