Event does not appear in Properties window?

D

David Veeneman

I have declared an event that uses generic event args and a generic event
handler:

// Delegate
public delegate void ItemChangingEventHandler<T>(object sender,
ItemChangingEventArgs<T> e);

// Event
public event ItemChangingEventHandler<DateTime?> ValueChanging;

The evnt and delegate work fine, except for one thing: The event does not
appear in the VS Properties window.

How do I get this event to show up in the Properties window? Thanks in
advance.
 
A

Andy

Add a [System.ComponentModel.Browsable( true )] attribute to the event.
Also may want to add a System.ComponentModel.Category attribute as
well. See the help for those attributes for more info.
 
D

David Veeneman

Unfortunately, that has no effect There is something about the <TEventArgs>
that keeps the event from showing up.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top