Created
April 26, 2010 11:26
-
-
Save andyb/379223 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class TextBoxAttached : TextBox | |
| { | |
| #region ValidateOnTextChange (Attached DependencyProperty) | |
| public static readonly DependencyProperty ValidateOnTextChangeProperty = | |
| DependencyProperty.RegisterAttached("ValidateOnTextChange", typeof(bool), typeof(TextBoxAttached), new PropertyMetadata(new PropertyChangedCallback(OnValidateOnTextChangeChanged))); | |
| public static void SetValidateOnTextChange(DependencyObject o, bool value) | |
| { | |
| o.SetValue(ValidateOnTextChangeProperty, value); | |
| } | |
| public static bool GetValidateOnTextChange(DependencyObject o) | |
| { | |
| return (bool)o.GetValue(ValidateOnTextChangeProperty); | |
| } | |
| private static void OnValidateOnTextChangeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) | |
| { | |
| } | |
| #endregion | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment