views:

12

answers:

1

Hi,

Objects whose Properties are observed for changes must implement the System.ComponentModel.INotifyPropertyChanged event to alert their WPF-element observers that a change has occurred.

If I have a Visual Basic Module whose Properties I wish to have observed by a WPF element, how should I go about routing the Properties of that Module through to the WPF, considering that Modules cannot, themselves, implement Interfaces?

EDIT: Modules are Static classes, for you C# readers, IIRC.

A: 

Define an event called [Property]Changed in your module, where [Property] is the name of the property that is changing. WPF will respond to these, as well as to the PropertyChanged events raised by INotifyPropertyChanged objects.

Samuel Jack
I can't get this to work, but I'm going to blame the project and mark this as the answer, which is looking more and more desperately cobbled-together and ghastly the longer I look at it (I didn't write it, so I don't have to take the blame :P ). I ended up making the Module into a Class, making all of my methods and attributes Shared and making all instances of the class into dumb reporter objects. But your answer sounds way cooler than doing it that way.
Frosty840