public Tray() { AddOneCommand = new RelayCommand(args => { var recipe = args as Recipe; SelectedCategory.Add(recipe); (AddOneCommand as RelayCommand)?.OnCanExecuteChanged(); }, (args) => SelectedCategory.CanAcceptMore); RemoveOneCommand = new RelayCommand(args => { var recipe = args as Recipe; SelectedCategory.Remove(recipe); (RemoveOneCommand as RelayCommand)?.OnCanExecuteChanged(); }); RemoveCommand = new RelayCommand(args => { var recipe = args as Recipe; SelectedCategory.Remove(recipe, recipe.NumOfServings); (RemoveCommand as RelayCommand)?.OnCanExecuteChanged(); }); InitializeComponent(); }