Ejemplo n.º 1
0
        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]);
            }
        }
Ejemplo n.º 2
0
        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]);
            }
        }