예제 #1
0
 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);
 }
예제 #2
0
 protected override void OnLostFocus(RoutedEventArgs e)
 {
     base.OnLostFocus(e);
     this.IsEditing = false;
     ValueEditorUtils.ExecuteCommand(this.LostFocusCommand, this, null);
     e.Handled = true;
 }
예제 #3
0
        private void OnFinishEditing()
        {
            ICommand finishEditingCommand = this.FinishEditingCommand;

            if (finishEditingCommand == null)
            {
                Keyboard.Focus(null);
                return;
            }
            ValueEditorUtils.ExecuteCommand(finishEditingCommand, this, null);
        }
예제 #4
0
 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();
 }
예제 #5
0
 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();
 }
예제 #6
0
 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;
     }
 }
예제 #7
0
 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;
     }
 }
예제 #8
0
        private void OnFinishEditing()
        {
            ICommand finishEditingCommand = this.FinishEditingCommand;

            if (finishEditingCommand != null)
            {
                ValueEditorUtils.ExecuteCommand(finishEditingCommand, (IInputElement)this, (object)null);
            }
            else
            {
                Keyboard.Focus((IInputElement)null);
            }
        }
예제 #9
0
 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;
 }
예제 #10
0
 private void CancelChange()
 {
     ValueEditorUtils.ExecuteCommand(this.BeginCommand, (IInputElement)this, (object)null);
     this.CancelStartedChange();
 }