I tried myself and this is how it will look like :
TabControl tc = new TabControl();
TabItem item1 = new TabItem();
item1.Name = "tabIitemContent";
item1.Header = "Tab Item with Buttons";
StackPanel panel = new StackPanel();
Button btnOk = new Button();
btnOk.Content = "_OK";
panel.Children.Add(btnOk);
Button btnCancel = new Button();
btnOk.Content = "_Cancel";
item1.Content = panel;
tc.Items.Add(item1);
TabItem item2 = new TabIten();
item2.Name = "backgroundcolor";
item2.Header = "background";
item2.Content = "Background property information goes here.";
tc.Items.Add(item2);
I assume now you have got the idea how it works.
Good luck!