By default, users can't close the tabs on a C1TabControl control. You can alter this by setting the TabItemClose property to InEachTab or GlobalClose so that users can close tabs by clicking a button inside the tab or by selecting a tab and then clicking a universal close button (see Tab Closing for more information). In this topic, you will set the TabItemClose property to GlobalClose in Design view, in XAML, and in code.
In Design View
Complete the following steps:
1. Select the C1TabControl control.
2. In the Properties window, click the TabItemClose drop-down arrow and select GlobalClose from the list.
In XAML
To allow users to close tabs using a universal button, add
TabItemClose="GlobalClose"
to <c1:C1TabControl>
tab so that the markup resembles the following:
<c1:C1TabControl TabItemClose="GlobalClose"></c1:C1TabControl>
In Code
Complete the following steps:
1. Open the Window1.xaml.cs page.
2. Enter Code view and add the following code beneath the InitializeComponent() method:
C1TabControl1.TabItemClose = GlobalClose
•C#
c1TabControl1.TabItemClose = GlobalClose;
3. Run the program.
This Topic Illustrates the Following:
The image below depicts a C1TabControl control tabstrip with a global close button.