4
2010
Refactoring: Extracting the Singleton Pattern
In this post, I show how to extract a Singleton Pattern, to reduce coupling and improve testability by using the Dependency-Inversion Principle
6
2009
A view model base class to use with MVVM in WPF
A view model base class to use with MVVM in WPF, with caching of PropertyChangedEventArgs for each property.
16
2009
Using Data Binding with Static Resources in WPF
In this post, I’ll be showing how to use resources for which you don’t know in design time the key to use in xaml (maybe because you’re loading them dynamically), by binding them to view model properties.
28
2009
An Introduction to ObservableCollection in WPF
This post discusses ObservableCollection
13
2009
Creating a Custom Observable Collection in WPF
One of the biggest advantadges WPF has is its Data Binding features. Data Binding can be done in several ways, but the most common is using the INotifyPropertyChanged and INotifyCollectionChanged interfaces. For simple objects, all you need to do is implement the INotifyPropertyChanged, and raise the PropertyChanged event when your properties change. When you want to bind to a collection, you will want to use ObservableCollection<T>. This collection implements both interfaces, therefore notifying you when the items in the collection change and when the items’ properties change. This works great if you’re using standard collections. The problem arises when you want to use a custom collection. For databinding to work with custom collections, you will have to create a new “Observable” wrapper around it.
An article by