Custom controls - React to property change

  • Thread starter Thread starter news.xs4all.nl
  • Start date Start date
N

news.xs4all.nl

Hello,

what's the best way to handle a change to one of the
default Control properties (like AutoSize, BackColor and such)?

Override the property itself (get/set) or override the
protected method responsible for raising the On-xxx-Change event?


Regards,
Marcel
 
Peter Duniho said:
Either override the OnXXXChanged method or handle (subscribe to) the event
itself.

There's no reason at all to override the actual property unless you
actually need to modify how that property behaves.

Pete

ok, thanks Pete, that sounds logical.

Best regards,
Marcel
 
Back
Top