WPF Databinding

Just a small observation based on a bit of reading I’ve been doing around the tradeoffs between having your view model (or it’s attached model) implement  INotifyPropertyChanged v Deriving from DependencyObject and implementing dependency properties.

It’s not about the issue it’s self, but the attitude of some of the posts: Those which worry me seem to argue for an overall “best solution”.

Both techniques work, and they have different pros and cons. (see google for many opinions)

So what worries me is that unless you consider your choice in the context of your specific implementation, you could end up down the wrong track…

It’s kind of like asking which is the best: Bubble sort or Quicksort?

Oh sorry, I forgot to mention it’s an embedded sytem short of memory, and the data array is ordered apart from a few well separated pairs of consecutive items that are out of order…

So in the WPF context, you maight need the property to animate say, or it your view model needs to derive from another class….

It seems to me that it it better to keep the differences in mind and decide in the context of the property you are implementing…

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply