When adding WPF styles through control templates and resourcedictionarys VS2010 throws an InvalidOperationException error in the designer on controls when certain properties are set, that link back to the Visual States. I thought this must be the way
i was creating the Visual States (i am using Blend 4.0) but I am also getting the same error, even using the ControlTemplateExamples downloaded from the msdn site.
I opened up the solution in VS2010, then opened MainWindow.xaml (split screen - designer and markup)
'System.Windows.Media.Animation.ColorAnimation' animation object cannot be used to animate property 'Foreground' because it is of incompatible type 'System.Windows.Media.Brush'.
... there are 11 errors but the solution builds successfully and runs fine.
If you look at the markup in MainWindow.xaml and the first set of buttons, the first error is linked to the "IsEnabled" property
View Complete Post