Customize the document tabs menu items look?

Docking/MDI for WPF Forum

Posted 1 year ago by Ethem Acar
Version: 22.1.4

Is it possible to customize the document tabs menu items look & the switcher items look.

Example how it looks by default:

Example customization made with paint (icons on the right instead left)

Comments (1)

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA


The document tabs menu is a regular ContextMenu and will use whatever theme your app's context menu items use.  Note that it (and other menus) raise the DockSite.MenuOpening event before they are displayed and the ContextMenu instance is passed in the event args.  You can apply a Style or custom Template to any of the menu items in that ContextMenu if you want to alter the template.

As for the switcher items, those are set via the StandardSwitcher.ItemTemplate property, which has this default value:

<DataTemplate DataType="docking:DockingWindow">
			<ColumnDefinition Width="Auto" />
			<ColumnDefinition Width="*" />

		<shared:DynamicImage Margin="0,0,7,0" Width="16" Height="16" Stretch="Uniform" Source="{Binding ImageSource}" VerticalAlignment="Center"
								Visibility="{Binding ImageSource, Converter={StaticResource ImageSourceVisibilityConverter}}" />
		<shared:PixelSnapper Grid.Column="1" VerticalAlignment="Center">
			<TextBlock Text="{Binding TabTextResolved}" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" />

You can alter that to another DataTemplate to change it.

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.