protected void TransitionTo(ViewModelState destination) { var handlers = ViewModelStateTransitioning; if (handlers != null) { handlers(this, new ViewModelStateTransitioningEventArgs(destination)); } }
private void TransitionTo(ViewModelState state) { if (State != null) { State.ViewModelStateTransitioning -= OnViewModelStateTransitioning; if (State is IDisposable) { ((IDisposable)State).Dispose(); } } if (state == null) { state = new AskForBugState(); } State = state; State.ViewModelStateTransitioning += OnViewModelStateTransitioning; DataContext = state; }
public ViewModelStateTransitioningEventArgs(ViewModelState state) { State = state; }