public sealed class ValidationTextBox : Control{ public ValidationTextBox() { this.DefaultStyleKey = typeof(ValidationTextBox); } public string Text { get => (string)GetValue(TextProperty); set => SetValue(TextProperty, value); } public static readonly DependencyProperty TextProperty = DependencyProperty.Register(nameof(Text), typeof(string), typeof(ValidationTextBox), new PropertyMetadata(default(string)));}
public sealed class ValidationTextBox : Control{ public ValidationTextBox() { this.DefaultStyleKey = typeof(ValidationTextBox); } public string Text { get => (string)GetValue(TextProperty); set => SetValue(TextProperty, value); } public static readonly DependencyProperty TextProperty = DependencyProperty.Register(nameof(Text), typeof(string), typeof(ValidationTextBox), new PropertyMetadata(default(string)));}
For some reason he doesn't do these Mode=TwoWay, UpdateSourceTrigger=PropertyChanged.