0

I want to handle the TabControl's SelectionChanged event in one of its child TabItems only. How can I do this?

I've tried

<TabControl Name="tbcTab">
    <TabItem Selector.SelectionChanged="tbcTab_SelectionChanged"/>
    ....

and it doesn't work. TabItem doesn't seem to have any other way of knowing when it's become the selected one.

FreddyFlares
  • 473
  • 6
  • 17

1 Answers1

0

Gotcha - just do it the other way around - listen to the event at your TabControl level then check

System.Windows.Controls.SelectionChangedEventArgs.AddedItems[0] - if it's what you expect -act.

user3455395
  • 161
  • 10