Example #1
0
        private void HandleFavoriteCheckedChange(object sender, FavoriteCheckedChangeEventArgs e)
        {
            ProductViewModel vm = adapter.GetItem(e.Position).Product;

            vm.IsFavorite = e.IsChecked;
            if (e.IsChecked)
            {
                productService.AddToFavorites(vm);
            }
            else
            {
                productService.RemoveFromFavorites(vm);
            }
        }
Example #2
0
 private void OnFavoriteCheckedChange(FavoriteCheckedChangeEventArgs args) => FavoriteCheckedChange?.Invoke(this, args);