Click here to Skip to main content
15,886,801 members
Articles / Desktop Programming / WPF

WPF Bindings

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
18 Apr 2011Apache1 min read 6.7K  
WPF Bindings

I am kinda tired of this MVVM/bindings crap. I feel like my hands are tied, for a variety of reasons:

  1. 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.
  2. Binding tend to fail in peculiar ways, and this sends you to a wild goose chase.
  3. 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.
  4. 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.

This article was originally posted at http://www.ikriv.com/blog?p=824

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


Written By
Technical Lead Thomson Reuters
United States United States
Ivan is a hands-on software architect/technical lead working for Thomson Reuters in the New York City area. At present I am mostly building complex multi-threaded WPF application for the financial sector, but I am also interested in cloud computing, web development, mobile development, etc.

Please visit my web site: www.ikriv.com.

Comments and Discussions

 
-- There are no messages in this forum --