#314 – Typical Usage for Default and Cancel Buttons

You’ll typically see Default and Cancel buttons used together in a window or dialog, to provide OK / Cancel functionality.

The idea is that if the user presses the ENTER key, the button marked with the IsDefault property receives a Click event, as if the user had clicked on the OK button.  The data that the user entered in the dialog is accepted and the window disappears.

If the user presses the ESC (Escape) button, the button marked with the IsCancel property receives a Click event, as if the user had clicked on the Cancel button.  The data that the user entered in the dialog is abandoned (not saved) and the window disappears.

Advertisement

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: