oknais
oknais

Reputation: 31

Binding Tapped event

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

Answers (1)

oknais
oknais

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

Related Questions