2

When viewing a Silverlight 5 project in blend if you are using System.Windows.Interactivity you get an error when loading the designer. Here is an example of the exception:

Unable to cast object of type 'Microsoft.Expression.Interactivity.Core.ChangePropertyAction' to type 'System.Windows.Interactivity.TriggerAction'.

The code compiles and runs with no issues I just cannot view the designer in blend. Has anyone else seen this issue?

Update: This may only be an issue in the themes\generic.xaml file.

Update: The fix was when declaring the namespaces in the xaml do this:

xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"

instead of this:

xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:ei="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"

Hopefully this will save someone else some time!

erothvt
  • 73
  • 5
  • You should post the fix as an answer instead, it would be clearer and more in the spirit of SO. – jv42 Jan 24 '12 at 13:35

1 Answers1

1

The fix was when declaring the namespaces in the xaml do this:

xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"

instead of this:

xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:ei="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"

Hopefully this will save someone else some time!

McGarnagle
  • 101,349
  • 31
  • 229
  • 260
erothvt
  • 73
  • 5