c# - WPF: Validate TextBox content immediately -


this question has answer here:

is there way in wpf/xaml indicate validation should performed (after each character entered in textbox) instead of when focus lost?

you should detect event "keyup" or "keydown" , check if input correct.

private void textbox_keyup(object sender, keyroutedeventargs e) {             if (e.key == yourkey)     {         //do     } } 

Comments

Popular posts from this blog

c - Calling a function within a loop -

vb.net - Unbound DataGridView add row with checkbox error -

How i fill combobox items in Radgridview manually using in vb.net -