public override void Setup() { base.Setup(); TargetElement.Dispatcher.Invoke(DispatcherPriority.ContextIdle, new Action(() => { currentState = new BeginEditState(); currentState.Enter(this); })); EditStateService.CanBeginEditChanged += EditStateServiceOnCanBeginEditChanged; }
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); } })); }