public StringItem(string text, Uri imageUri, CartAnimationViewModel cartAnimationViewModel) { Text = text; ImageUri = imageUri; _cartAnimationViewModel = cartAnimationViewModel; Add = new DelegateCommand(AddExecute); }
public CartAnimationPage() { _selectedAnimation = "1"; DataContext = _cartAnimationViewModel = new CartAnimationViewModel(); InitializeComponent(); AppBarButton appBarButton = (AppBarButton)((CommandBar)((Grid)Content).Children[0]).PrimaryCommands[0]; _notHighligthedForeground = appBarButton.Foreground; appBarButton.Foreground = new SolidColorBrush(Colors.Red); Loaded += (sender, args) => { _addToCartAnimation = new AddToCartAnimation(this); _animationTarget = CartPlaceholder; }; Unloaded += (sender, args) => { _addToCartAnimation.Dispose(); }; }