I am kinda tired of this MVVM/bindings crap. I feel like my hands are tied, for a variety of reasons:
- Bindings don’t work with properties of properties, because they rely on visual tree to find the data context. E.g. if you have a “
Settings
” object, binding its properties to anything but static
resources is problematic. Infragistics field settings is the most annoying example of that. - Binding tend to fail in peculiar ways, and this sends you to a wild goose chase.
- Bindings timing is a mystery. There is no guarantee when exactly the binding will actually fire. This may and will lead to funky race conditions if your logic depends on more than one binding.
- MVVM isolates you from the view. To do simple things like play an animation or change focus, you must jump through ridiculous hoops and write loads of indirect code known as “attached behaviors”.
All this makes me wish to return to the good old passive view model. Encapsulation – yes. Crippling – no. A little bit more code, but at least you can do whatever you want. The only thing that leaves a shadow of a doubt in my head is data templates for item controls. These do need bindings, but I am sure complex templates can be easily converted to passive view, I just need to think of a way to do it.
CodeProject