public class MyBinding : Binding { public JsBinding(): base() { InitiateBinding(); } public JsBinding(string path) : base(path) { InitiateBinding(); } private void InitiateBinding() { this.ValidatesOnDataErrors = true; this.ValidatesOnExceptions = true; this.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged; UpdateSourceExceptionFilter = UpdateSourceExceptionFilterCallback; } private object UpdateSourceExceptionFilterCallback(object bindExpression, Exception exception) { // Set focus back to bound framework element // Setup PreviewKeyDown and PreviewLostKeyboardFocus on bound framework element to prevent further user input until data has become valid } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)