How to set and get updatesourcetrigger of a textbox in codebehind?
问题 Just a short question : In wpf, how do I set and get updatesourcetrigger of a textbox in codebehind ? Thanks Update : I follow AngleWPF's code : var bndExp = BindingOperations.GetBindingExpression(this, TextBox.TextProperty); var myBinding = bndExp.ParentBinding; var updateSourceTrigger = myBinding.UpdateSourceTrigger; But I got the exception : An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in PresentationFramework.dll Additional information: Exception