Ejemplo n.º 1
0
 protected void EndChangingDynamicItem()
 {
     Validation.ClearInvalid(CloneTextBox.GetBindingExpression(TextBox.TextProperty));
     if (ErrorToolTip != null)
     {
         ErrorToolTip.IsOpen = false;
         ErrorToolTip        = null;
     }
     Binding = null;
     RemoveDynamicControls();
     DisposeDynamicItems();
 }
Ejemplo n.º 2
0
 protected virtual void OnValidate()
 {
     if (Binding == null)
     {
         Binding = CloneTextBox.GetBindingExpression(TextBox.TextProperty);
     }
     IsValid = IsValidName();
     if (!IsValid)
     {
         Validation.MarkInvalid(Binding, new ValidationError(new ExceptionValidationRule(), Binding));
         if (ErrorToolTip == null)
         {
             ErrorToolTip = new ToolTip {
                 Content = TextRedactor.PathErrorMessage
             };
             CloneTextBox.ToolTip = ErrorToolTip;
         }
         ErrorToolTip.IsOpen = true;
     }
 }
Ejemplo n.º 3
0
 protected override void OnValidate()
 {
     if (!Notes.ContainsKey(CloneTextBox.Tag.ToString()) || Notes.ContainsKey(CloneTextBox.Text) || !File.Exists(ParentControl.BrowseProject.LoadedFile))
     {
         IsValid = false;
         if (Binding == null)
         {
             Binding = CloneTextBox.GetBindingExpression(TextBox.TextProperty);
         }
         Validation.MarkInvalid(Binding, new ValidationError(new ExceptionValidationRule(), Binding));
         if (ErrorToolTip == null)
         {
             ErrorToolTip = new ToolTip {
                 Content = TextRedactor.PathErrorMessage
             };
             CloneTextBox.ToolTip = ErrorToolTip;
         }
         ErrorToolTip.IsOpen = true;
     }
     else
     {
         IsValid = true;
     }
 }