Interaction.Behaviors in Windows 10 UAP

Viewed 6533

I'm experimenting with using Interaction.Behaviors in XAML to bind events to my controller like so,

<GridView x:Name="mygrid" >
    <interact:Interaction.Behaviors>
        <interactcore:EventTriggerBehavior EventName="SelectionChanged">
            <interactcore:InvokeCommandAction
                Command="{Binding Controller.Test}"
                CommandParameter="{Binding ElementName=mygrid, Path=SelectedItem}"/>
        </interactcore:EventTriggerBehavior>
    </interact:Interaction.Behaviors>
</GridView>

This works perfectly except... Visual Studio 2015 shows the following errors,

Severity    Code    Description Project File    Line    Suppression State
Error       The name "EventTriggerBehavior" does not exist in the namespace "using:Microsoft.Xaml.Interactions.Core".   MVC C:\Prototype\MVC\MVC\MainPage.xaml  19  
Error       The name "InvokeCommandAction" does not exist in the namespace "using:Microsoft.Xaml.Interactions.Core".    MVC C:\Prototype\MVC\MVC\MainPage.xaml  20  
Error       The name "Interaction" does not exist in the namespace "using:Microsoft.Xaml.Interactivity".    MVC C:\Prototype\MVC\MVC\MainPage.xaml  18  

This has caused the designer to break, so even though the code works, the designer doesn't. Any ideas?

My includes are...

xmlns:interact="using:Microsoft.Xaml.Interactivity"
xmlns:interactcore="using:Microsoft.Xaml.Interactions.Core"

And just to clarify, I included the behaviors SDK via the "Add Reference..." dialog.

1 Answers
Related