public void UnLiked(LikeButton p0) { var adapterPosition = (int)p0.GetTag(Resource.Id.favorite_item_tag_key); if (adapterPosition > -1 && ViewModel.ItemsSource.Count > adapterPosition) { ViewModel.ItemsSource[adapterPosition].IsFavorite = false; ViewModel.RemoveFavoriteItemCommand.Execute(ViewModel.ItemsSource[adapterPosition]); } }
public void Liked(LikeButton p0) { var adapterPosition = (int)p0.GetTag(Resource.Id.favorite_item_tag_key); if (adapterPosition > -1) { ViewModel.ItemsSource[adapterPosition].IsFavorite = true; ViewModel.AddToFavoritesCommand.Execute(ViewModel.ItemsSource[adapterPosition]); } }