Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ....
- foreach (string id in ids)
- {
- TabControl.Items.Add(CreateTabItem(id));
- }
- private TabItem CreateTabItem(string name)
- {
- StackPanel txtBlock = new TextBlock();
- txtblock.Text = name;
- txtBlock.HorizontalAlignment = Horizontalalignment.Center;
- panel.Children.Add(txtBlock);
- TabItem item = new TabItem();
- item.Header = panel;
- <SomeControl> control = new <SomeControl>();
- item.Content = control;
- return item;
- }
- MinWidth="100" MinHeight="300" TabStripPlacement="Left"
- <ScrollViewer>
- <TabControl
- TabStripPlacement="Left"
- x:Name="Tab"
- >
- </TabControl>
- </ScrollViewer>
Add Comment
Please, Sign In to add comment