private void TabContainer_SelectionChanged(object sender, SelectionChangedEventArgs e) { switch ((string)((TabItem)TabContainer.SelectedItem).Header) { case "Champions": Champions champions = ChampionsContainer.Content as Champions; champions.Update(); break; case "Skins": Skins skins = SkinsContainer.Content as Skins; skins.Update(); break; default: break; } }