Here is how I have the property bound: Can anyone tell me what I'm doing wrong?I have read a lot of questions that seemed very similar to this, but none of the answers worked for me. I have some very simple code that lets the user type in a number between 1 and 99,999 (inclusive).The problem I am running into is that when the value is not valid and I just ignore the value, the Text Box bound to this property does not update to reflect that change; rather, it just retains the value as it is typed in.public static void Set Value(Dependency Object obj, string value) // Using a Dependency Property as the backing store for Value. public static readonly Dependency Property Value Property = Dependency Property.Register Attached("Value", typeof(string), typeof(My Custom Control), new UIProperty Metadata(On Value Property Changed)); public static void On Value Property Changed(Dependency Object obj, Dependency Property Changed Event Args e) Once again, as you can see from my answer that you can still show code in your question to help others answer your question no matter how complex your solution may be (if you want a good answer, you need to put in the effort to ask a good question).Text property, the text you type into the Text Box does not update the source until the Text Box loses focus (for instance, when you click away from the Text Box).If you want the source to get updated as you are typing, set the Update Source Trigger of the binding to Property Changed.
It just seems to not work when I try to not set the Property to the new value. After doing some searching, I found: WPF Textbox refuses to update itself while binded to a view model property, which details a workaround that references: Textbox getting out of sync with viewmodel property. NET 4.5 I'd suggest that, but of course it's not always as easy as that. I've tried setting my original pnl Debtor to null before setting the new control, but got the same results. Text = "Dummy") in the codebehind for the File View control, it works fine. Am I not able to replace an existing control with a new one this way?Note The Update Source Trigger property deals with source updates and therefore is only relevant for Two Way or One Way To Source bindings.For Two Way and One Way To Source bindings to work, the source object needs to provide property change notifications.