Hubert Solecki
Hubert Solecki

Reputation: 2771

Click event on Image control Windows Phone 8.1

I'm currently developing an app for Windows Phone 8.1. As for Windows Phone Silverlight 8.1, I wanted to bind a click event on an image control but it appears as there is no more Click or Tap event on an Image Control... Is it normal ? Does somebody already manage to get a click event on an image ? I've used PointerEntered method instead but it has a specific behavior...

Upvotes: 0

Views: 2820

Answers (1)

FAHID
FAHID

Reputation: 3395

Try this.

<Image Tapped="btnName_Tapped" Source="Assets/image_icon.png" />

Code Behind:

private void btnName_Tapped(object sender, TappedRoutedEventArgs e) { //your code goes here. }

Upvotes: 3

Related Questions