private void HandleOpenTabClick(TabButton sender) { var tab = GetTabGroup(sender); SwitchTab(tab); }
// Gets the tab group with the tab button. private TabGroup GetTabGroup(TabButton tabButton) { return(tabs.First(tab => tab.TabButton == tabButton)); }