title: How can I add a gesture recognizer to a viewModel C#
body: <p>I have a label like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Label Grid.Row="1" Grid.Column="0" x:Name="faveLabel" Style="{StaticResource smallIcon}" FontFamily="FontAwesome" VerticalOptions="FillAndExpand" VerticalTextAlignment="Center" /&gt;
  </code></pre>
  
  <p>and in the C# behind I have:</p>
  
  <pre class="lang-cs prettyprint-override"><code>faveLabel.GestureRecognizers.Add(
              new TapGestureRecognizer()
              {
                  Command = new Command(() =&gt;
                  {
                      App.phrase.Favorite = !App.phrase.Favorite;
                      faveLabel.TextColor = App.phrase.Favorite == true ? Color.Red : Color.Gray;
                      App.DB.UpdateFavorite(App.phrase.Favorite, App.phrase.PhraseId);
                  })
              });
  </code></pre>
  
  <p>As I am binding a ViewModel to this frame then how can I move this into this viewModel code?</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class PhrasesFrameViewModel : ObservableProperty
  {
      public PhrasesFrameViewModel()
      {
  
          var aButtonClickedCommand = new Command(() =&gt;
          {
              App.DB.IncrementScore(App.cfs, App.phrase, (int)App.aBtn);
              App.correctButtonPressed = (int)App.aBtn;
              ResetTimer2();
          });
  </code></pre>
  
  <p>Note that I would really like to avoid adding the gesture recognizer into the XAML as the XAML is already rather large.</p>