Wpf stop routing event when MessageBox appear?

Posted by yossharel on Stack Overflow See other posts from Stack Overflow or by yossharel
Published on 2010-12-29T17:50:08Z Indexed on 2010/12/29 17:53 UTC
Read the original article Hit count: 289

Filed under:
|

Hi all,

I've PreviewMouseDown event on TreeView in order to determine if user can select other item based on some logic. If the current item data changed, will appear MessageBox that asks the user if he want to discard the changes. if user press YES , I set e.Handled = false; to enable the new selection. and if user press NO, I set e.Handled = true; to cancel the new selection.

The problem is that although I set e.Handled = false , the event stop and no selection event occurs on TreeView. Someone has solution for that?

Thanks in advance!

© Stack Overflow or respective owner

Related posts about wpf

Related posts about routedevents