hi Steven,
You must expose this event to the client from within your control. In the
public event handler, your custom control exposes, mark it as you would with
any property you want exposed in the propertygrid. The events go in the
action category like :
[
Category("Action"),
Description("Raised when MySomeButton click occurs.")
]
public event SomebuttoEventHandler MyButtonCommand {
add {
Events.AddHandler(EventMyButtonCommand, value);
}
remove {
Events.RemoveHandler(EventMyButtonCommand, value);
}
}
"Stephen Barrett" <stephen_barrett@aoncons_nospam.com> wrote in message
news:%...
> We have a couple of webcontrols that we have built for our web
development.
> All these controls basically listen to a single event handler. The
controls
> are currently loaded into our toolbox for drag and drop addition.
>
> I have noticed that on the controls from MSFT, if you double click it in
> design view, it wires up the event handler in the OnInit and takes you to
> code view.
>
> I would like to add this functionality to our controls to save developer
> time doing it manually by switching to "event" view on the property page
of
> the control and manually typing in the EventHandler property.
>
> Can someone point me in the right direction or let me know how to do this?
>
> TIA,
> Stephen
>
>
|