C# – Event firing in WPF

.net-3.5cwpf

I have a tab contol with two tabs. Each one containing listviews. When the selection change event of listview is fired, the selection change of tabcontrol is also fired. How can I prevent this?

Best Answer

Set the Handled property of the EventArgs object to true when you are done with the listview event so it wont route further up the tree...

e.Handled = true;

HTH