Hide some event

  • Thread starter Thread starter cfyam
  • Start date Start date
C

cfyam

I made a new UserControl, and I want to hide some event (like click..) when
the other user use the control view the property page! How can I do?
 
I tried a few things and it doesn't look easy.

If you just want to hide the event from the designer set the Browsable
attribute in the derived class:
[Browsable(false)]
public new event EventHandler Click;

Otherwise, if you needed to completely remove it from the interface:
Maybe hack the IL? Or inherit from Component, but that would strip you of
lots of base functionality.


HTH;
Eric Cadwell
http://www.origincontrols.com
 
Back
Top