Beispiel #1
0
 protected virtual void AddHandlers(TextBox textBox)
 {
     RawValueTracker.TrackUserInput(textBox);
     textBox.UpdateHandler(Input.ValidationDirtyEvent, OnValidationDirtyHandler);
     textBox.UpdateHandler(FrameworkElement.LoadedEvent, OnValidationDirtyHandler);
     BindTextToValue(textBox);
 }
Beispiel #2
0
        private static void OnCultureChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var textBox = d as TextBox;

            if (textBox != null && textBox.GetSourceValueType() != null)
            {
                RawValueTracker.Update(textBox);
                textBox.RaiseEvent(FormattingDirtyArgs);
            }
        }
Beispiel #3
0
        private static void OnStringConverterChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var textBox = d as TextBox;

            if (textBox != null)
            {
                textBox.CoerceValue(MinProperty);
                textBox.CoerceValue(MaxProperty);
                RawValueTracker.Update(textBox);
                textBox.RaiseEvent(FormattingDirtyArgs);
            }
        }