Reputation: 31
I'm writing a Windows Phone 8.1 app and I would like to get binding Tapped event (e.g. for Grid) capability. I read many articles and answers, but all solutions don't work in my situation. Does it exist any alternative to triggers (System.Windows.Interactivity) or Command for WP 8.1?
Upvotes: 1
Views: 858
Reputation: 31
Thanks for interest, but I found solution. I probably was too tired and I forgot add reference to Behaviors SDK. It works great now.
<Page
xmlns:i="using:Microsoft.Xaml.Interactivity"
xmlns:core="using:Microsoft.Xaml.Interactions.Core" ...>
And simple Command usage:
<SomeControl ...>
<i:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="Tapped">
<core:InvokeCommandAction Command="{Binding MyCommand}" />
</core:EventTriggerBehavior>
</i:Interaction.Behaviors>
</SomeControl>
Upvotes: 1