Articles in this section
Category / Section

How to change the style of editable tabitem header in TabcontrolExt

1 min read

Editable tab item header style can be changed by EditHeaderItemStyle of TabControlExt with the TargetType as TextBox.

The same has been explained in the following code snippet:

 XAML:

// Code Explains How to set the style when editing Tabitem header for TabcontrolExt
<Window
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf" x:Class="TabItem1.MainWindow"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<Style x:Key="EditHeaderstyle" TargetType="TextBox">
<Setter Property="Background" Value="Yellow">
</Setter>
<Setter Property="Foreground" Value="Red">
</Setter>
</Style>
</Window.Resources>
 <Grid>
<syncfusion:TabControlExt Name="tab" CloseButtonType="Individual" EditHeaderItemStyle="{StaticResource EditHeaderstyle}" >
<syncfusion:TabItemExt Header="TabItemExt1"  MinWidth="150"
 MinHeight="20" ></syncfusion:TabItemExt>
<syncfusion:TabItemExt Header="TabItemExt2" MinWidth="150" MinHeight="20">
</syncfusion:TabItemExt>
<syncfusion:TabItemExt Header="TabItemExt3" MinWidth="150" MinHeight="20">
</syncfusion:TabItemExt>
</syncfusion:TabControlExt>
</Grid>
</Window>

Output:

      C:\Users\Ashok.Murugesan\Desktop\Navigation\editheaderitemstyle.png

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied