INotifyPropertyChanged interface causing a XamlParseException?
22 December, 2008 § Leave a comment
I was working yesterday on a side project, and came across an unexpected exception when trying to debug the program. I hadn’t changed any of the XAML, but all of a sudden I was getting a XamlParseException with an ambiguous message when the program started up. It turns out that I was using the INotifyPropertyChanged pattern wrong.
If you have a property named ControlVisibility, then when you call PropertyChanged, you must make sure to create the new PropertyChangedEventArgs with “ControlVisibility” as the argument.
Shout out to Craig for helping me with this.