detecting changes of subproperties

  • Thread starter Thread starter nicolasr
  • Start date Start date
N

nicolasr

Hi,

I'm writing a custom control that has several class type
properties, f.e. ImageList, List<string>, StringFormat.
None of these classes seems to provide a 'Change' event.
The result of this is that I don't get notified when the user
edits the subproperties at design time and am unable to
refresh the control reflecting the new values.

Is there a general approach to this problem?
Would I really have to wrap all these classes in my own
classes that double the interface of the wrapped class and
provide Change events?

thanks for any help,
Nick
 
List<T> could possibly be replaced with BindingList<T> which provides
what you need via ListChanged... but nothing reallly for the other 2
:-(

Marc
 
Hi,

| Hi,
|
| I'm writing a custom control that has several class type
| properties, f.e. ImageList, List<string>, StringFormat.
| None of these classes seems to provide a 'Change' event.
| The result of this is that I don't get notified when the user
| edits the subproperties at design time and am unable to
| refresh the control reflecting the new values.
|

AFAIK there is no such a thing for StringFormat at least, you would have to
wrap them :(

Hey, maybe you can write a general wrapping class using reflectoin that send
an event when a property is changed :)
 

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

Back
Top