Bind command to X-button of window title bar

Posted by LukePet on Stack Overflow See other posts from Stack Overflow or by LukePet
Published on 2010-05-24T07:28:06Z Indexed on 2010/05/24 7:31 UTC
Read the original article Hit count: 273

Filed under:
|
|
|
|

My WPF maintenance window have a toolbar with a button "Exit"; a CommandExit is bind with this button. The CommandExit perform some checks before exit.

Now, if I click to close button of the window (x-button of title bar), this checks are ignored.

How can I do to bind CommandExit to window x-button?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about window