protected override void OnDataLoaded() { OnPropertyChanged("OrderItems"); ClearAllOrdersCommand = new DelegateCommands(ClearAllOrders, (object o) => (OrderItems.Count > 0)); RemoveOrderCommand = new DelegateCommands(RemoveOrder); IsLoading = false; OnPropertyChanged("ClearAllOrdersCommand"); OnPropertyChanged("RemoveOrderCommand"); OnPropertyChanged("IsLoading"); }
protected override void OnDataLoaded() { this.MenuItems = base.Repository.StandardMenuItems; this.CurrentlySelectedMenuItems = new ObservableCollection<MenuItem> { this.MenuItems[3], this.MenuItems[5] }; OnPropertyChanged("CurrentlySelectedMenuItems"); OnPropertyChanged("MenuItems"); AddItemsToSelectedCommand = new DelegateCommands(AddItemsToSelected, (p) => (p is MenuItem)); AddOrderCommand = new DelegateCommands(AddOrder); IsLoading = false; OnPropertyChanged("AddItemsToSelectedCommand"); OnPropertyChanged("AddOrderCommand"); OnPropertyChanged("IsLoading"); }