Beispiel #1
0
 private void CancelChange()
 {
     ValueEditorUtils.ExecuteCommand(this.BeginCommand, this, null);
     ValueEditorUtils.UpdateBinding(this, StringEditor.ValueProperty, false);
     ValueEditorUtils.ExecuteCommand(this.CancelCommand, this, null);
     ValueEditorUtils.UpdateBinding(this, StringEditor.ValueProperty, UpdateBindingType.Target);
     this.UpdateTextFromValue();
 }
Beispiel #2
0
 private void CommitChange()
 {
     ValueEditorUtils.ExecuteCommand(this.BeginCommand, this, null);
     this.Value = this.Text;
     ValueEditorUtils.ExecuteCommand(this.CommitCommand, this, null);
     ValueEditorUtils.UpdateBinding(this, StringEditor.ValueProperty, UpdateBindingType.Target);
     // Now update the text value in case the model or a binding has reformated
     this.UpdateTextFromValue();
 }
Beispiel #3
0
 public static void UpdateBinding(FrameworkElement element, DependencyProperty property, bool updateSource)
 {
     ValueEditorUtils.UpdateBinding(element, property, (updateSource ? UpdateBindingType.Both : UpdateBindingType.Target));
 }