Example #1
0
        public void SetTextFromNotesAndSetBinding(Altaxo.Main.ITextBackedConsole con)
        {
            Text = con.Text;

            var binding = new System.Windows.Data.Binding
            {
                Source = con,
                Path   = new System.Windows.PropertyPath(nameof(Text)),
                Mode   = System.Windows.Data.BindingMode.TwoWay
            };

            _textBinding = SetBinding(System.Windows.Controls.TextBox.TextProperty, binding);
        }
 public static void MarkInvalid(System.Windows.Data.BindingExpressionBase bindingExpression, ValidationError validationError)
 {
 }
 public static void ClearInvalid(System.Windows.Data.BindingExpressionBase bindingExpression)
 {
 }
Example #4
0
 public void ClearBinding()
 {
     // Clears the old binding
     _textBinding = null; // to avoid updates when the text changed in the next line, and then the TextChanged event of the TextBox is triggered
     System.Windows.Data.BindingOperations.ClearBinding(this, System.Windows.Controls.TextBox.TextProperty);
 }