Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there Selected Tab Changed Event in the standard WPF Tab Control

In WPF, is there an event that can be used to determine when a TabControl's selected tab changes?

I have tried using TabControl.SelectionChanged but it is getting fired many times when a child's selection within a tab is changed.

like image 288
Jon Kragh Avatar asked Apr 21 '09 14:04

Jon Kragh


1 Answers

I tied this in the handler to make it work:

void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e) {     if (e.Source is TabControl)     {       //do work when tab is changed     } } 
like image 91
Jon Kragh Avatar answered Nov 08 '22 11:11

Jon Kragh