Introduction Windows Presentation Foundation features quite a variety of different mechanisms that provide notifications of when a property changes its value. These mechanisms come from several different feature areas: from data binding, from the WPF property system, and also from the cluster of features around styling, templating and controls. This is Part Two of Two, and covers some of the scenarios that are more code than markup, and often involve creating custom classes. Part One concentrated on some of the lighter-weight techniques, where property changes could be addressed through markup techniques, using built-in WPF features, or both. The following are the specific areas that Part Two will cover: Creating a custom DependencyProperty, or overriding the metadata (includes PropertyChanged, CoerceValue callbacks) The DependencyObject.OnPropertyChanged callback (aka the Big Hammer) Properties that are collections, and detecting changes to the collection Freezables Resources Creating
Read More...