Anybody know how could we cancelÃÂ SelectedItemChanged event in TreeView/ListBox/ComboBox.
Basically, I have a master navigation tree and a detail view of object, everytime user change to a new "node" in tree i want to ask if user want to save changes made in detail view. Since i didn;t know how to preview selection changed, I used PreviewMouseDown in treeView.
Here is my code:
treeView.PreviewMouseDown(sender, MouseButtonEventArgs e)
//ask user save changed?
//if "cancel" then e.Handle = true;
//else e.Handle = false;
this seems working but without messagebox, if I use messagebox to show then the event seem disposed even e.Handle is true or false.