private void InitialiseDelegates() { _performFetchCommand = new DelegateCommand { CanExecuteDelegate = x => true, ExecuteDelegate = x => FetchImages() }; _performSelectedImagesDownloadCommand = new DelegateCommand { CanExecuteDelegate = x => !IsFavoritesMode, ExecuteDelegate = x => SaveImages() }; _clearSelectionCommand = new DelegateCommand { CanExecuteDelegate = x => true, ExecuteDelegate = x => RemoveSelection() }; _openSettingsCommand = new DelegateCommand { CanExecuteDelegate = x => true, ExecuteDelegate = x => { SettingsOpen = !SettingsOpen; } }; _setFavoritesModeCommand = new DelegateCommand { CanExecuteDelegate = x => true, ExecuteDelegate = x => { IsFavoritesMode = !IsFavoritesMode; } }; }
public DownloadTrackerVM(ObservableCollection<BasePost> imagelist) { _downloadsList = imagelist; _clearCompletedCommand = new DelegateCommand { CanExecuteDelegate = x => true, ExecuteDelegate = x => ClearCompleted() }; }