Is it possible to check a form for any empty text boxes rather than having to put a check on each individual text box with an if? Any help would be much appreciated.
Asked
Active
Viewed 389 times
-3
-
2Did you tried anything? – Soner Gönül Apr 25 '13 at 14:52
-
5Yes. Anything is possible if you use your imagination. – MadHenchbot Apr 25 '13 at 14:53
-
1You can databind the textboxes and use validation – Mark Homer Apr 25 '13 at 15:20
1 Answers
0
I'm not that familiar with WPF, but you might try to get a list of the child-elements in a form, and for each, check if they are of type Textbox
. If so, perform your validation.

Kjartan
- 18,591
- 15
- 71
- 96