Custom controls - React to property change

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
 
M

Marcel Overweel

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
 

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