Example #1
0
        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;
        }
Example #3
0
 public ViewModelStateTransitioningEventArgs(ViewModelState state)
 {
     State = state;
 }