Articles in this section
Category / Section

How to change the style of tab list contextmenu in TabcontrolExt

1 min read

Tablistcontextmenu can be customized by TabListContextMenuTemplate property for TabcontrolExt with the Target type as ContextMenu.

The same has been explained in the following code snippet:

XAML:

//Code Explains How to Customize the Contextmenu 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="DragDrop.MainWindow"
Title="MainWindow" Height="350" Width="525">
<Grid>
<syncfusion:TabControlExt Name="tabcontrol">
<syncfusion:TabControlExt.TabListContextMenuTemplate>
<ControlTemplate TargetType="ContextMenu">
<Border Background="Yellow">
<Grid>
<Ellipse Fill="ForestGreen" Stroke="Red"></Ellipse>
<ItemsPresenter></ItemsPresenter>
</Grid>
</Border>
</ControlTemplate>
</syncfusion:TabControlExt.TabListContextMenuTemplate>
<syncfusion:TabItemExt Header="TabItem1"  MinWidth="150" MinHeight="20"/>
<syncfusion:TabItemExt Header="TabItem2"  MinWidth="150" MinHeight="20"/>
<syncfusion:TabItemExt Header="TabItem3"  MinWidth="150" MinHeight="20"/>
</syncfusion:TabControlExt>
 </Grid>
</Window>

Output:

C:\Users\Ashok.Murugesan\Desktop\Navigation\tabcontextmenutemplate.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