WPF: What is difference between try…finally and try..catch..finally in WPF, MVVM?
I’m using a custom TextBox to validate input value.
If the input data was invalid, a message box would be shown and the Text in TextBox would be rollback, else update the Model .
In the ViewModel, I used try…finally in set method.
When I entered an invalid value to TextBox, the message box appeared but the Text didn’t be rollback.
But if I used try…catch…finally in set method the Text was rollback.
Here is my code: