I have my own custom TextBox class. In part it helps me handle scans from a barcode reader.
Part of what I need for this to work is a way to capture when the value bound to TextProperty changes.
Note: I am not looking for the “TextChanged” event or any kind of event that relates to a key press (except when that key press updates the source).
I need an event that will fire ONLY when the underlying value gets changed, and I need to be able to access it in my TextBox (meaning it can’t be in the ViewModel).
Is this possible?
Yes, you can do this:
In your class’ constructor:
And then the handler:
Hope it helps,
Regards