Is there any way to get notified BEFORE the text in a Windows::UI::Xaml::Controls::TextBox
changes (TextChanged
and TextChangedEventHandler
work great to get notified AFTER the text changes)?
The functionality I am seeking would be loosely equivalent to iOS's shouldChangeCharactersInRange
.
You could store the previous
Text
value from the lastTextChanged
event in a field and if you are not happy with the new value onTextChanged
- revert to the old value. Alternatively - you could indicate an error without actually preventing a value change.