Tag Archives: remove tabs

Remove tabs from a WPF TabControl at runtime in C#

The example Add tabs to a WPF TabControl at runtime in C# shows how you can add tabs to a control at runtime. You would think removing tabs would be easier, and it is in a way. You simply remove … Continue reading

Posted in controls, user interface | Tagged , , , , , , , , , , , , | Leave a comment

Add tabs to a WPF TabControl at runtime in C#

When you click the + button, this example uses the following code to add a tab to the WPF TabControl named tabMain. // Add a tab to the TabControl. private void btnAdd_Click(object sender, RoutedEventArgs e) { TabItem tab_item = new … Continue reading

Posted in controls | Tagged , , , , , , , , , , , , , | 1 Comment

Add tabs to a TabControl at runtime in C#

The post Make an improved owner-drawn TabControl in C# shows how to build an owner-drawn TabControl that lets the user remove tabs at runtime. This example lets you add tabs, too. The program includes a Label that displays an X. … Continue reading

Posted in controls | Tagged , , , , , , , , , , | 2 Comments