Is This Behavior As Designed
11:45 15 Oct 2026

Here are relevant snippets of a wpf window:


                
                
                
                <>
                ....

This is the relevant code:

Private Sub tabMain_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles tabMain.SelectionChanged
    Debug.WriteLine(CType(sender, Control).Name)
End Sub

Every time a selection is made using a ComboBox the tabMain_SelectionChanged routine is called and the Debug statement produces "tabMain". When a selection is made with the DateTimePicker or a button, that routine is called twice.

I know how to avoid the problem by only responding to TabItem changes via the mouse so that is not my concern here. I want to know if this behavior is by design or if I should expend time finding the underlying issue. And if the latter, where to start?

wpf vb.net