TabOverflowBehavior: On TabbedMdiHost, how can I have tabs overflow to a new line?

Docking/MDI for WPF Forum

Posted 8 months ago by Andrea
Version: 23.1.3
Avatar

I want to be able to keep all of the tabs visible instead of hiding in a scroll, in a menu, or shrinking.

Is there a setting or way to allow the overflowing tabs just to create a new row (wrap the line)? 

            <docking:DockSite>
                <docking:Workspace>
                    <docking:TabbedMdiHost TabOverflowBehavior="{Binding TabOverflowBehavior}"/>
                </docking:Workspace>
            </docking:DockSite>

TabOverflowBehavior Enum (ActiproSoftware.Windows.Controls.Docking) - Actipro WPF Controls Docs

[Modified 8 months ago]

Comments (3)

Posted 8 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

While we don't have a direct option for that, I believe you can use code like this to use a WrapPanel for the items panel:

<docking:TabbedMdiHost x:Name="tabbedMdiHost">
	<docking:TabbedMdiHost.TabControlStyle>
		<Style TargetType="docking:TabbedMdiContainerTabControl">
			<Setter Property="ItemsPanel">
				<Setter.Value>
					<ItemsPanelTemplate>
						<WrapPanel />
					</ItemsPanelTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</docking:TabbedMdiHost.TabControlStyle>
</docking:TabbedMdiHost>


Actipro Software Support

Posted 7 months ago by Andrea
Avatar

Hello, Thank you for sharing the XAML, it looks great but one major flaw. The drag-and-drop doesn't work. Do you have any suggestions about how we could implement it so that we could still reorder the tabs and move to other tab groups? 

[Modified 7 months ago]

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

Correct, unfortunately drag and drop reorder won't work without the AdvancedTabPanel primitive control being used in the ItemsPanelTemplate.  AdvancedTabPanel doesn't support a wrapping layout option at this time.  I have logged it as a suggestion for possible future implementation.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.