private void RiseControl() { SearchCommand?.RiseCanExecute(); ClearCommand?.RiseCanExecute(); CatalogNavigateViewModel.FirstCommand.RiseCanExecute(); CatalogNavigateViewModel.PreviousCommand.RiseCanExecute(); CatalogNavigateViewModel.NextCommand.RiseCanExecute(); CatalogNavigateViewModel.LastCommand.RiseCanExecute(); SetEnabled(!HasError.Value); Messenger?.Send(CommandName.EnableMenu, new EnableMenuEventArgs(!HasError.Value)); }
private void ActionAfterLoadCatalog(Exception e, object needToUpdate) { if ((bool)needToUpdate) { Application.Current.Dispatcher.Invoke( () => { SearchCriteria?.SearchComplited(); SearchCommand?.RiseCanExecute(); ClearCommand?.RiseCanExecute(); CatalogNavigateViewModel.FirstCommand.RiseCanExecute(); CatalogNavigateViewModel.PreviousCommand.RiseCanExecute(); CatalogNavigateViewModel.NextCommand.RiseCanExecute(); CatalogNavigateViewModel.LastCommand.RiseCanExecute(); OnPropertyChanged(nameof(Entities)); OnPropertyChanged(nameof(SelectedItem)); RefreshCatalogView(); }); } }
private void OnCanDoSearchChanged(object sender, EventArgs e) { SearchCommand?.RiseCanExecute(); }