views:

196

answers:

0

I have the following scenario.

I have a ViewModel object (It's just a regular object, that impliments INotifyPropertyChanged). I'm binding this object to a view, written in WPF. When I bind it it works fine, events fire, and things are updated, perfect!!!

Now I've tried to introduce some validation into the object, I'm checking argument values before the method is called, and throwing an ArgumentException if they're bad.

I'm using Ninject for my DI, and I've decided to use LinFu for the proxy factory. I'm using a static attribute on the method that I want to intercept. I'm also loading the LinfuIntegration Module before any of my other modules. As soon as I put an attribute on the object, it appears as though none of the INotifyPropertyChanged events are being fired. Actually when I look at the event it's still null, which tells me that my view hasn't subscribed to it.

I tried to do the same with the Castle Dynamic proxy, and got the same results

Has anyone out there used a any of the proxy options in Ninject to a databound object in WPF. My guess is has something to do with the proxy being a subclass of what WPF expects to actually be there, but I'm not sure. I'll post some code if you need it, but I figured I'd put the question out there first.

thank

Josh