Good question and way to go to avoid event handlers were possible. They make your model more complex and can impact performance as they will be triggered each and every time the corresponding event is raised.
To solve your problem you can go to the properties of the page and set the close action to your custom cancel button. This should do the trick!