1
Vote

EventToCommand xaml error, "A value of type 'EventToCommand' cannot be added to a collection or dictionary of type 'TriggerActionCollection'."

description

I'm trying to implement EventToCommand within one of my views, but when I add the code (below), then I get a parser error:

"A value of type 'EventToCommand' cannot be added to a collection or dictionary of type 'TriggerActionCollection'."

Is this code configured correctly? Seems to be the same as many other online examples I've seen. Thanks in advance for any assistance.
xmlns:galaSoft="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.SL5"


<i:Interaction.Triggers>
    <i:EventTrigger EventName="KeyDown">
        <galaSoft:EventToCommand Command="{Binding Test}" PassEventArgsToCommand="True" />
    </i:EventTrigger>
</i:Interaction.Triggers>

comments