开发者

Enable button only if all TextBoxes pass validations in WPF Window

开发者 https://www.devze.com 2023-03-10 20:25 出处:网络
I implemented several classes that extend ValidationR开发者_StackOverflowule and wrote ControlTemplates and Styles to be used in a form. They are working ok, but now I need to know in runtime if there

I implemented several classes that extend ValidationR开发者_StackOverflowule and wrote ControlTemplates and Styles to be used in a form. They are working ok, but now I need to know in runtime if there are TextBoxes that don't pass the corresponding validation, so - for instance - a given button is disabled unless they do.

I'd like to avoid the iteration on the entire form looking for TextBoxes that don't comply with the corresponding rule (unless I could check it's rule in runtime).

Thanks in advance.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号