Ejemplo n.º 1
0
        protected static void OnTextPatternChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
        {
            ValidatingTextBox sourceControl = (source as ValidatingTextBox);

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

            if (sourceControl.IsInitialized)
            {
                sourceControl.validationErrors.Clear();
                sourceControl.InternalValidate();
            }
        }
Ejemplo n.º 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;
            }
        }