Beispiel #1
0
		public FavoriteButton ()
		{
			tap = new TapGestureRecognizer ();
			tap.Tapped += Tap_Tapped;

			GestureRecognizers.Add (tap);
			vm = BindingContext as FoodViewModel;
		}
Beispiel #2
0
        public FavoriteButton()
        {
            tap         = new TapGestureRecognizer();
            tap.Tapped += Tap_Tapped;

            GestureRecognizers.Add(tap);
            vm = BindingContext as FoodViewModel;
        }
Beispiel #3
0
		protected override void OnBindingContextChanged ()
		{
			base.OnBindingContextChanged ();
			vm = BindingContext as FoodViewModel;
			Source = vm != null && vm.IsFavourite ? "fav.png" : "nofav.png";
		}
Beispiel #4
0
 protected override void OnBindingContextChanged()
 {
     base.OnBindingContextChanged();
     vm     = BindingContext as FoodViewModel;
     Source = vm != null && vm.IsFavourite ? "fav.png" : "nofav.png";
 }