How to customize Tab control

Docking/MDI for WPF Forum

Posted 7 years ago by Anton Chochia
Version: 16.1.0635



Per documentation TabbedMdiHost.TabItemContainerStyle can be set to a custom style.

I defined style for AdvancedTabItem type

<Style x:Key="DefaultTabbedTemplateKey" TargetType="docking:AdvancedTabItem">



and this style to set  to TabItemContainerStyle as follow

<Style x:Key="{x:Type docking:TabbedMdiHost}" TargetType="docking:TabbedMdiHost">

<Setter Property="TabItemContainerStyle" Value="{StaticResource DefaultTabbedTemplateKey}"/>



Resource dictionary with these styles is also merged in app's resources as follow:

Application.Current.Resources.MergedDictionaries.Add(newResourceDictionary { Source = newUri(@"/somedll.dll;component/Resources/Generic.xaml", UriKind.Relative) });

But nothing changed and i see default style for tab.

Any additional steps should be done to apply custom style?


Comments (1)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Anton,

A lot of properties on AdvancedTabControl get bound and pushed down to its items.  I wonder if you are running into override issues because of that.  If you are just changing some things like colors or corner radius, set related properties like TabBackgroundActiveSelected on AdvancedTabControl instead.  You can get to that via TabbedMdiHost.TabControlStyle.

Or if you want to completely make your own control template for each tab, you can set the Template property via a style like what you were doing.  But our pre-defined template is pretty flexible and can be configured via the numerous properties on AdvancedTabControl.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.