Category / Section
How to add a new button in TabControlExt?
1 min read
In TabControlExt, you can display a new tab by using the IsNewButtonEnabled property and the click event on new tab can be handled by the NewButtonClick event handler. The following code example demonstrates the same.
XAML
<syncfusion:TabControlExt x:Name="tabcontrol" IsNewButtonEnabled="True" NewButtonClick="tabcontrol_NewButtonClick" > <syncfusion:TabItemExt Header="tab1"/> <syncfusion:TabItemExt Header="tab2"/> <syncfusion:TabItemExt Header="tab3"/> </syncfusion:TabControlExt>
C#
private void tabcontrol_NewButtonClick(object sender, EventArgs e) { MessageBox.Show("New button clicked"); }
The following screenshot displays the New Button added in TabControlExt.
Figure 1: New Button added in TabControlExt