Xamarin Forms add a Tag to a View
<p>I have a problem with my Image buttons i want that my function Categorie_Onclick can see with button is clicked. I tried this with adding Tags but it doesnt work. Is there a way to do this?</p>

<p>XAML:</p>

<pre class="lang-xml prettyprint-override"><code>&lt;!-- Button1 --&gt;
&lt;Image
  x:Name="CityGuideButton1"
  Source="shopping_gray.png"
  Aspect="Fill"
  HorizontalOptions="FillAndExpand"
  VerticalOptions ="FillAndExpand"
  Tag="01"&gt;
  &lt;Image.GestureRecognizers&gt;
    &lt;TapGestureRecognizer
      Tapped="Categorie_Onclick"
      NumberOfTapsRequired="1"/&gt;
  &lt;/Image.GestureRecognizers&gt;
&lt;/Image&gt;

&lt;!-- Button2 --&gt;
&lt;Image
  x:Name="CityGuideButton2"
  Source="secrets.png"
  Aspect="Fill"
  HorizontalOptions="FillAndExpand"
  VerticalOptions ="FillAndExpand"
  Tag="02"&gt;
&lt;Image.GestureRecognizers&gt;
  &lt;TapGestureRecognizer
    Tapped="Categorie_Onclick"
    NumberOfTapsRequired="1"/&gt;
&lt;/Image.GestureRecognizers&gt;
</code></pre>

<p></p>

<p>Button handler:</p>

<pre class="lang-cs prettyprint-override"><code>private async void Categorie_Onclick(Object sender, EventArgs args)
{
    Image cmd = sender as Image;
    string txt = TapGestureRecognizer.tag.ToString();
    await Navigation.PushAsync(new CategoriePage());
}
</code></pre>