Esempio n. 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);
 }
Esempio n. 2
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();
 }
Esempio n. 3
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();
 }
Esempio n. 4
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;
 }
Esempio n. 5
0
 public static void UpdateBinding(FrameworkElement element, DependencyProperty property, bool updateSource)
 {
     ValueEditorUtils.UpdateBinding(element, property, (updateSource ? UpdateBindingType.Both : UpdateBindingType.Target));
 }