Example #1
0
        protected static void OnTextPatternChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
        {
            ValidatingTextBox sourceControl = (source as ValidatingTextBox);

            if (sourceControl.IsInitialized)
            {
                sourceControl.Validate();
            }
        }
Example #2
0
        protected static void OnToolTipTextChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
        {
            ValidatingTextBox sourceControl = (source as ValidatingTextBox);

            if (sourceControl.IsInitialized)
            {
                sourceControl.validationErrors.Clear();
                sourceControl.InternalValidate();
            }
        }
Example #3
0
        private void ValidatingTextBox_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            ValidatingTextBox sourceControl = sender as ValidatingTextBox;

            if (!sourceControl.IsInitialized)
            {
                return;
            }

            if ((bool)e.NewValue)
            {
                UpdateErrorState();
            }
            else
            {
                this.ClearValue(BorderThicknessProperty);
                borderModified = false;
            }
        }