title: Preventing a dialog from closing in the button's click event handler
body: <p>I have a dialog that I show with <code>&lt;class&gt;.ShowDialog()</code>. It has an OK button and a Cancel button; the OK button also has an event handler.</p>
  
  <p>I want to do some input validation in the event handler and, if it fails, notify the user with a message box and prevent the dialog from closing. I don't know how to do the last part (preventing the close).</p>