This project has moved and is read-only. For the latest updates, please go here.

Attachable property 'Triggers' was not found in type 'Interaction'

Nov 16, 2009 at 8:58 AM

Hi Laurent,

as I said before your Toolkit is working perfectly fine for me in #34855.
The below error message doesnt actually prevent building, so just as a headsup in case this didnt show up before.

In both your zipped version of v3 aplha2 released on Nov. 3rd as well as in a #34855 build ReSharper and VS2008 itself give a design-time error message of:

The attachable property 'Triggers' was not found in type 'Interaction'.

Offending code:

	<!-- bind command to KeyUp -->
	<Interactivity:EventTrigger EventName="KeyUp">
		<MvvmExtras:EventToCommand Command="{Binding EventCommandOnSearchBoxKeyUp}" PassEventArgsToCommand="True" />
	<!-- bind command to PreviewKeyDown -->
	<Interactivity:EventTrigger EventName="PreviewKeyDown">
		<MvvmExtras:EventToCommand Command="{Binding EventCommandOnSearchBoxPreviewKeyDown}" PassEventArgsToCommand="True" />
	<!-- bind command to SelectionChanged -->
	<Interactivity:EventTrigger EventName="SelectionChanged">
		<MvvmExtras:EventToCommand Command="{Binding EventCommandOnSearchBoxSelectionChanged}" PassEventArgsToCommand="True" />

I dont have Blend installed, so maybe missing some SDK stuff?
Anyway - it builds and performs perfectly well, so no need for action really :-)

Nov 16, 2009 at 9:42 AM


Yes, you need a reference to the System.Windows.Interactivity DLL which is included in the External folder. I think I forgot to add these DLLs in Alpha2, but they are available in 34855 and later.

Sys.Win.Interactivity contains the base classes for all Blend behaviors and triggers. It is to be added in addition to GalaSoft.MvvmLight.Extras. This is an additional dependency which is not available yet in the .NET framework or in Silverlight. Additional dependencies suck, but on the other hand, it brings so much goodness that it is worth it.

A tutorial on using EventToCommand is available on my blog:

Let me know if that solves the issue for you.



Nov 16, 2009 at 10:43 AM


well - its not really an Issue for me in the first place as the error messages do not prevent me from building and executing the application.
I had the Sys.Win.Interactivity assembly referenced though. Leaving it out would prevent a sucessful build.


Nov 16, 2009 at 1:19 PM

Oh sorry, I didn't get that you had the error in spite of the reference. Thats weird, and I don't see that here. Is it a small project you can maybe zip and send me? Would love to see how the DLL is referenced.



Dec 9, 2009 at 10:47 PM

Hi Laurent,

did you have a chance to look at the mini-solution I sent you regarding this issue?
Btw - I installed Blend meanwhile and the error still shows up in VS2008, so its not some missing Blend component like I assumed.



Dec 13, 2009 at 11:16 AM

No I am sorry, I didn’t have any time. I am caught up in 2 projects plus started to write a new Silverlight 4 book, and had little or no time to give to the MVVM Light toolkit.

That said, I noticed the same error in VS2008 the other day. I suppose there is an issue with Sys.Win.Interactivity.dll and Studio 2008 is not able to detect the attached behavior. It’s a bit hard to find out the cause for this kind of errors. However it seems to work fine in VS10, so maybe the best is to just ignore that error, or move development to VS10...

Sorry about that,


Dec 13, 2009 at 5:21 PM

Heh - no need to be sorry at all - I dont want to know how my app would look without your framework :-)
Will seriously consider making the move to VS2010 than.

Cheers and good luck on your current projects,


Jun 29, 2010 at 2:31 PM
Edited Jun 29, 2010 at 2:32 PM
Hi, I got same exception. After some investigation, I have found that: - if I will use System.Windows.Interactivity inside "Silverlight Code Library" project it will fail during execution. - if I will use it in "Silverlight Application" project it will work. So as a result, I can't use Event to Trigger in xaml that is in "Silverlight Code Library" project. Thanks, Odugen
Jun 30, 2010 at 7:22 AM

OK yesterday I played with test projects. And here is what I have got.

If Solution has following structure:

- SCL: Silverlight Code Library Project
  - with control referencing to System.Windows.Interactivity.dll

- SA: Silverlight Application
  - That reference to SCL project and use control with Interaction

SA will fail. If we will look to Bin folder it is missing System.Windows.Interactivity.dll
If we maunally add reference to System.Windows.Interactivity.dll in SA project everything works as expected.

That solves my problem. But I wish I knew how to configure SCL project so that System.Windows.Interactivity.dll will automatically copied to SA project. Just like MVVMLight dll's do.



Jul 30, 2010 at 6:45 PM

I'm having the same issue in VS2008 SP1.  Using the toolkit in WPF.

This is a problem of VS2008 and it is necessary a hotfix for VS.

I found the fix in social msdn: Getting Triggers was not found in type Interaction error

This is the link of the hotfix: