WPF DataBinding: Nullable Value Types

We recently ran into what appeared to be an inconsistency in WPF’s data binding. When you attempt to data bind to a nullable value type with a value of null, WPF appears to drop the binding. Using an identity converter and several other methods only told us what we already knew, so I did a little research this morning.

hortha posted a solution with examples to the MSDN Code Gallery that we tried this morning. His solution works beautifully. Several commenters noted that VS2008 SP1 is supposed to fix this without converters, but no one seems to have tried it.

Advertisements

One thought on “WPF DataBinding: Nullable Value Types

Comments are closed.