Get id of selected item of ListView in Xamarin.Forms
<p>This is my ListView :</p>

<pre><code> &lt;ListView  Grid.Column="0" Grid.Row="1" ItemTapped="itemTapped" x:Name="listofEmployee" BackgroundColor="{x:Static color:ColorResources.listBackgroundColor}" IsVisible="false"&gt;
            &lt;ListView.ItemTemplate&gt;
                &lt;DataTemplate&gt;
                    &lt;ViewCell&gt;
                        &lt;StackLayout BackgroundColor="#eee" Orientation="Vertical"&gt;
                            &lt;StackLayout Orientation="Horizontal"&gt;
                                &lt;Image x:Name="imgCheckUncheck" Source="btn_check_off.png" VerticalOptions="CenterAndExpand" HeightRequest="30" WidthRequest="30" &gt;
                                    &lt;Image.GestureRecognizers&gt;
                                        &lt;TapGestureRecognizer Tapped="OnImg_TapGestureRecognizerTapped" /&gt;  
                                    &lt;/Image.GestureRecognizers&gt;
                                &lt;/Image&gt;
                                &lt;Label Text="{Binding empName}" VerticalOptions="CenterAndExpand" TextColor="{x:Static color:ColorResources.listTextColor}" /&gt;                               
                            &lt;/StackLayout&gt;
                        &lt;/StackLayout&gt;
                    &lt;/ViewCell&gt;
                &lt;/DataTemplate&gt;
            &lt;/ListView.ItemTemplate&gt;
        &lt;/ListView&gt;
</code></pre>

<p>Model for this :</p>

<pre><code>public  class empList_Model
{
    public string empName{ get; set;}
    public int Selected{ get; set;}
    public string id{ get; set;}
}
public static class empList_Data
{
    public static List&lt;empList_Model&gt; getData ()
    {
        return new List&lt;empList_Model&gt; {

            new empList_Model () {
                empName = "Bryan Garret",Selected=0,id="1"
            },

            new empList_Model () {
                empName = "James Simpson",Selected=0,id="2",
            },

            new empList_Model () {
                empName = "Kathryn Newer",Selected=0,id="3"
            },

            new empList_Model () {
                empName = "Amanda Stevens",Selected=0,id="4"
            },

        };
    }
}
</code></pre>

<p>By using above code I want to take some actions as below :</p>

<p>1)On image tap, set property selected=1 or selected=0 of class empList_Model.</p>

<p>2)On image tap, display property "id" in DisplayAlert() function.</p>