if (!string.IsNullOrWhiteSpace(args.NewTextValue))
{
bool isValid = args.NewTextValue.ToCharArray().All(char.IsDigit);
((Editor)sender).Text = isValid ? args.NewTextValue : args.OldTextValue;
}
, . , , , , 21h3 @hvaughan3, , 21h .
, (213).
! editor.TextChanged, , , . OnTextChanging. @hvaughan3 . , - , , OnTextChanged Code ,
if (!editor.Text.All(char.IsDigit)) return;