Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Raising an Image click from a subclassed ViewCell

$
0
0

Sorry if I am missing something obvious here, I am very new to this.

I have designed a ViewCell with a few lines of text and a clickable Image. The Image is using:

GestureRecognizers.Add (new TapGestureRecognizer ((view, args) =>

To raise a "tapped" event.

The ViewCell will be used in a ListView that will be bound to a list of ContactViewModel

ContactViewModel has a few properties, one of which is URI.

I need to get my ViewCell to call the Device.OpenURI method and pass in a URI based on the item bound to the ListView; when the image is tapped.

I have no idea how to do that? Is there a way to access the item that is bound to the ListView Cell, or do I need so somehow bind the Image "Tapped" event somehow? I am working completely in Code, not using XAML.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>