title: How to call TapGestureRecognizer from ViewModel
body: <p>I'm trying to implement TapGestureRecognizer which will be called in ViewModel (xaml.cs) not in View class...</p>
  
  <p>Here is sample code in xaml file: (IrrigNetPage.xaml)</p>
  
  <pre><code> &lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
           xmlns:i18n="clr-namespace:agroNet.AppResource;assembly=agroNet"
           xmlns:viewModels="clr-namespace:agroNet.ViewModel"
           x:Class="agroNet.View.IrrigNetPage"
           BackgroundColor="#EBEBEB"&gt;
  
      &lt;Grid&gt;
          &lt;Grid.GestureRecognizers&gt;
              &lt;TapGestureRecognizer Tapped="HideListOnTap"/&gt;
          &lt;/Grid.GestureRecognizers&gt;
      &lt;/Grid&gt;
  </code></pre>
  
  <p>I implemented HideListOnTap in xaml.cs page (view) like this: (IrrigNetPage.xaml.cs)</p>
  
  <pre><code>    int visibility = 1;
      private void HideListOnTap(object sender, EventArgs e)
      {
          visibility++;
          if ((visibility % 2) == 0)
          {
              IrrigList.IsVisible = false;
          }
          else
          {
              IrrigList.IsVisible = true;
          }
      }
  </code></pre>
  
  <p>It's working fine, but how to do the same thing usin ViewModel?
  (How to bind Gesture recognizer from (IrrigNetPage.xaml) with HideListOnTap in IrrigNetViewModel )</p>