Closeable tab item

This section demonstrates the use of the closeable tab item:


A tab control is placed in a window.

<Window Title="Example Project" x:Class="ExampleProject.MainWindow" xmlns:x="" xmlns="">
	<TabControl x:Name="exampleTabControl"/>


A closeable tab item is instantiated and given a title before being put into the tab control:

namespace ExampleProject
	using System.Windows;
	using Emi.UserControls;

	public partial class MainWindow : Window
		public MainWindow()

			// The constructor takes no arguments.
			CloseableTabItem exampleCloseableTabItem = new CloseableTabItem();

			// The tab item is given a title.
			exampleCloseableTabItem.Title = "Example Title";

			// The tab item is added to a tab control.


Closeable tab items are closeable by default but the closeability can be changed:

			// The tab item is made uncloseable.
			exampleCloseableTabItem.IsCloseable = false;


A demonstration of a tab control with closeable tab items.