我的TabControl
中有多个TabItems
;tabItem1
、tabItem2
、tabItem3
。。。它们是CCD_ 6。如果所有选项卡项都是活动的,我如何将tabItem.Header
添加到List<string>
?
List<string> listItems = new List<string>();
foreach (TabItem item in tabControl1.Items)
{
if (item.IsEnabled)
listItems.Add(item.Header.ToString());
}