I'm building a simple winforms application in c#, which consists of few forms.
One of the forms in my application consists of a few different controls, which must meet certain conditions for the form to be valid, and an accept button.
What I want is for the button to be disabled until all the fields are valid, then enable it when the conditions are met, yet I couldn't find any method to do so...
I've came across OnValidating
\ OnValidated
but they're only invoke on acceptButton_Click
. This of course requires me to enable the button by default, and assign the form's AcceptButton
property to it.
I remember wpf have something for this sort of thing (filter?), but I'm not sure such thing exists for winforms.