public FavoriteButton () { tap = new TapGestureRecognizer (); tap.Tapped += Tap_Tapped; GestureRecognizers.Add (tap); vm = BindingContext as FoodViewModel; }
public FavoriteButton() { tap = new TapGestureRecognizer(); tap.Tapped += Tap_Tapped; GestureRecognizers.Add(tap); vm = BindingContext as FoodViewModel; }
protected override void OnBindingContextChanged () { base.OnBindingContextChanged (); vm = BindingContext as FoodViewModel; Source = vm != null && vm.IsFavourite ? "fav.png" : "nofav.png"; }
protected override void OnBindingContextChanged() { base.OnBindingContextChanged(); vm = BindingContext as FoodViewModel; Source = vm != null && vm.IsFavourite ? "fav.png" : "nofav.png"; }