예제 #1
0
        public override void Setup()
        {
            base.Setup();

            TargetElement.Dispatcher.Invoke(DispatcherPriority.ContextIdle, new Action(() =>
            {
                currentState = new BeginEditState();
                currentState.Enter(this);
            }));

            EditStateService.CanBeginEditChanged += EditStateServiceOnCanBeginEditChanged;
        }
예제 #2
0
 private void MoveToNextState()
 {
     TargetElement.Dispatcher.BeginInvoke(DispatcherPriority.ContextIdle, new Action(() =>
     {
         var fms = UIServiceProvider.GetService <IFocusManagementService>(TargetElement);
         using (fms.DeferFocusUpdate())
         {
             log.Debug("Moving to next edit state");
             EditModeState nextState = currentState.GetNextState();
             currentState.Leave();
             currentState = nextState;
             currentState.Enter(this);
         }
     }));
 }