public ProgressInfo(LoadingViewModel busyViewModel, string message, bool isBlocking = true) { Contract.ArgumentNotNull("busyViewModel", busyViewModel); Contract.ArgumentNotNull("message", message); StartTime = DateTime.Now; ViewModel = busyViewModel; Message = message; IsBlocking = isBlocking; busyViewModel.Add(this); }
protected override void OnBindingContextChanged(ViewModel oldViewModel, ViewModel newViewModel) { Contract.PropertyNotNull("message", message); Contract.PropertyNotNull("cancelButton", cancelButton); base.OnBindingContextChanged(oldViewModel, newViewModel); LoadingViewModel previousViewModel = oldViewModel as LoadingViewModel; if (previousViewModel != null) { previousViewModel.ProgressUpdated -= UpdateControls; } if (ViewModel != null) { ViewModel.ProgressUpdated += UpdateControls; } UpdateControls(); }
public ProgressInfo(LoadingViewModel busyViewModel, string message, bool isBlocking = true) { Contract.ArgumentNotNull("busyViewModel",busyViewModel); Contract.ArgumentNotNull("message", message ); StartTime = DateTime.Now; ViewModel = busyViewModel; Message = message; IsBlocking = isBlocking; busyViewModel.Add(this); }