A reader asked if it might be possible to “gray out” a button so that pressing it has no action, until appropriate data has been entered?
The answer is “Yes, we can do this.” After some thought, I came up with the following simple solution.
Update 1: Check the comments to this post for a reader’s great solution for doing this for Location services dependent function.
Update 2: Also, you can set the button component’s Enabled property to false, so that the button will not function. Then set Enabled to true once the data entry meets your app’s requirements.
User Interface
What we want to do is have the button look like it is “grayed out” and unusable until after some data is entered into the field. In the text box, I have set the “hint” value to “Button available when data entered”:
After the user has entered some data, the button becomes “active” as shown here:
Continue reading Can you “gray out” a button until data entry is complete?