Using InvokeCommandAction in Winodws 8.1 Universal Applications

This is just a PSA posting.

If you are making the jump from Windows 8 or Windows Phone 8 XAML development and are used to use the EventToCommand helper which comes along w/ the MVVM Light framework, things have changed and it is ok. In fact Laurent has a nice post on how to use the new built-in EventTriggerBehior rather than the EventToCommand helper.

However, there is two key pieces of information missing from his examples.
1) In order to get the Interaction.Behaviors namespace included you reference the Behaviors SDK inside your Windows 8.1 project
2) You will need to add reference to the correct namespaces in your xaml (see below)

xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:core="using:Microsoft.Xaml.Interactions.Core"

Once you have done these 2 things you should be good to go.

Till next time,

This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

Leave a Reply