コード例 #1
0
        protected void TransitionTo(ViewModelState destination)
        {
            var handlers = ViewModelStateTransitioning;

            if (handlers != null)
            {
                handlers(this, new ViewModelStateTransitioningEventArgs(destination));
            }
        }
コード例 #2
0
        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;
        }
コード例 #3
0
 public ViewModelStateTransitioningEventArgs(ViewModelState state)
 {
     State = state;
 }