Is there a way to set ValidatesOnDataErrors to True for my custom DependencyProperty, so I do not have to do that every time I bind to it? Something in the lines of this.
public static readonly DependencyProperty TextProperty =
DependencyProperty.Register(nameof(Text), typeof(string),
typeof(ErrorTextEdit), new FrameworkPropertyMetadata(null)
{
BindsTwoWayByDefault = true,
DefaultUpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
// Something Here maybe???
});
public string Text
{
get { return (string) GetValue(TextProperty); }
set { SetValue(TextProperty, value); }
}
My control could also inherit from TextBox if that can help.