Tuesday, September 08, 2009

Cannot add content of type '...' to an object of type 'System.Windows.ResourceDictionary'

You may get an error of the form Cannot add content of type 'System.Windows.Style' to an object of type 'System.Windows.ResourceDictionary' when working with WPF and your first reaction would be "What?! Why not!?". Well, the issue is very simple, only it stems from another source entirely: you've just tried to add a Style with the same key as another previously entered style.

0 comments: