public MaterialItemListViewModel() { AddMaterialCommand = new AppCommand(ShowAddMaterialDialog, CanAddItem); AddGemCommand = new AppCommand(ShowAddGemDialog, CanAddItem); EditItemCommand = new AppCommand(ShowEditDialog, CanEditItem); CopyItemCommand = new AppCommand(ProcessCopy, CanCopyItem); DeleteItemCommand = new AppCommand(ProcessDelete); ItemList.CollectionChanged += (sender, e) => { AddMaterialCommand.RaiseCanExecuteChanged(); AddGemCommand.RaiseCanExecuteChanged(); CopyItemCommand.RaiseCanExecuteChanged(); }; }