I\'m currently working on something that is probably done in plenty of examples out there. But after some searching I can\'t find anything.
I\'m working with WPF tab
Try something like this:
tabControl1.Items.Insert(tabControl1.Items.Count-1,ti);
This will do because you always have at least one TabItem (the + one)
Then select the second last one by
tabControl1.SelectedIndex=tabControl1.Items.Count-2;