This question is really old but still... it is nice to have an answer
private bool createTab( List<string> tabNames, NIC savedSetting )
{
string newTabeName = savedSetting.AdapterName;
bool tabExists = false;
foreach(var checkTab in tabSettings.Items)
{
if( ( ( TabItem )checkTab ).Header.ToString() == newTabeName )
{
tabExists = true;
break;
}
}
if( !tabExists )
{
var NIC_Tab = new TabItem()
{
Header = newTabeName,
Content = new TabDataControl(),
DataContext = savedSetting
};
tabSettings.Items.Add( NIC_Tab );
}
return tabExists;
}
</string>