private void CancelStartedChange() { ValueEditorUtils.UpdateBinding((FrameworkElement)this, ChoiceEditor.ValueProperty, UpdateBindingType.Target); ValueEditorUtils.UpdateBinding((FrameworkElement)this, ChoiceEditor.ValueIndexProperty, UpdateBindingType.Target); this.UpdateInternalValuesFromValue(); ValueEditorUtils.ExecuteCommand(this.CancelCommand, (IInputElement)this, (object)null); }
protected override void OnLostFocus(RoutedEventArgs e) { base.OnLostFocus(e); this.IsEditing = false; ValueEditorUtils.ExecuteCommand(this.LostFocusCommand, this, null); e.Handled = true; }
private void OnFinishEditing() { ICommand finishEditingCommand = this.FinishEditingCommand; if (finishEditingCommand == null) { Keyboard.Focus(null); return; } ValueEditorUtils.ExecuteCommand(finishEditingCommand, this, null); }
private void UpdateChange() { if (!this.transactionOpen) { ValueEditorUtils.ExecuteCommand(this.BeginCommand, this, null); } this.Value = base.Text; ValueEditorUtils.ExecuteCommand(this.UpdateCommand, this, null); this.transactionOpen = true; ValueEditorUtils.UpdateBinding(this, StringEditor.ValueProperty, UpdateBindingType.Target); this.UpdateTextFromValue(); }
private void CancelChange() { if (!this.transactionOpen) { ValueEditorUtils.ExecuteCommand(this.BeginCommand, this, null); } ValueEditorUtils.UpdateBinding(this, StringEditor.ValueProperty, false); ValueEditorUtils.ExecuteCommand(this.CancelCommand, this, null); this.transactionOpen = false; ValueEditorUtils.UpdateBinding(this, StringEditor.ValueProperty, UpdateBindingType.Target); this.UpdateTextFromValue(); }
private void OnLastAction() { if (this.LastActionCommand != null) { ValueEditorUtils.ExecuteCommand(this.LastActionCommand, (IInputElement)this, (object)null); } else { int num = this.SelectedIndex < 0 ? this.savedIndex : this.SelectedIndex; this.SelectedIndex = -1; this.SelectedIndex = num; } }
protected override void OnTextChanged(TextChangedEventArgs e) { base.OnTextChanged(e); if (this.ignoreTextChanges) { return; } ValueEditorUtils.ExecuteCommand(this.TextChangedCommand, this, base.Text); if (this.IsEditing) { this.lostFocusAction = StringEditor.LostFocusAction.Commit; } }
private void OnFinishEditing() { ICommand finishEditingCommand = this.FinishEditingCommand; if (finishEditingCommand != null) { ValueEditorUtils.ExecuteCommand(finishEditingCommand, (IInputElement)this, (object)null); } else { Keyboard.Focus((IInputElement)null); } }
private void CommitChange() { ValueEditorUtils.ExecuteCommand(this.BeginCommand, (IInputElement)this, (object)null); if (this.UpdateValueFromInternalValues()) { ValueEditorUtils.UpdateBinding((FrameworkElement)this, ChoiceEditor.ValueProperty, UpdateBindingType.Source); ValueEditorUtils.UpdateBinding((FrameworkElement)this, ChoiceEditor.ValueIndexProperty, UpdateBindingType.Source); ValueEditorUtils.ExecuteCommand(this.CommitCommand, (IInputElement)this, (object)null); ValueEditorUtils.UpdateBinding((FrameworkElement)this, ChoiceEditor.ValueProperty, UpdateBindingType.Target); ValueEditorUtils.UpdateBinding((FrameworkElement)this, ChoiceEditor.ValueIndexProperty, UpdateBindingType.Target); } else { this.CancelStartedChange(); } this.lostFocusAction = ChoiceEditor.LostFocusAction.None; }
private void CancelChange() { ValueEditorUtils.ExecuteCommand(this.BeginCommand, (IInputElement)this, (object)null); this.CancelStartedChange(); }