public void Refresh() { lock (logs) { actionLogView.Refresh(logs); } }
void BackupSetPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { switch (e.PropertyName) { case "Status": { RaisePropertyChanged(() => ShowBackupRunDetails); RaisePropertyChanged(() => ActionLog2); RaisePropertyChanged(() => IsProgressBarVisible); RaisePropertyChanged(() => IsProcessRingVisible); return; } case "ProcessingStatus": { if (ProcessingStatus == BackupProcessingStatus.ActionQueueBuilt) { //Task.Factory.StartNew(() => // { ActionLog2 = new ObservableCollection <ActionLogItemViewModel>(ActionLog.Select(ba => new ActionLogItemViewModel(ba))); ActionLogView = (CollectionView)CollectionViewSource.GetDefaultView(ActionLog2); ActionLogView.Filter = IsToBeShownInLog; ActionLogView.Refresh(); RaisePropertyChanged(() => ActionLogView); RaisePropertyChanged(() => IsProgressBarVisible); RaisePropertyChanged(() => IsProcessRingVisible); // ActionLog2 = new ChangeNotifyingObservableCollection<ActionLogItemViewModel>(ActionLog.Select(ba => new ActionLogItemViewModel(ba))); //}) // .ContinueWith((t) => //{ RaisePropertyChanged(() => ActionLog2); //}); } return; } case "ProcessingProgressCount": { RaisePropertyChanged(() => ProcessingProgressMessage); return; } case "LastRunTime": { UpdateScheduleStatus(); return; } case "ErrorCount": { UpdateScheduleStatus(); return; } } }