The TabControl.SelectionChanged
is the same event as a ComboBox.SelectionChanged
It originates from Selector.SelectionChanged
.
So, if you do not mark your event as handled in your event handler, it will bubble up the tree, and eventually arrive at your TabControl
, which is causing this "firing too often" issue.
Mark your event as handled in your SelectionChanged of your ComboBox
/ListBox
/ListView
/any other Selector you use in your DataGrid like so:
private void MyComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
e.Handled = true;
}
And this inconvenience will go away ;).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…