Resizing TabStrip for DocumentWindows in Docksite

Docking/MDI for WPF Forum

Posted 4 years ago by Procam
Version: 21.1.0
Avatar

Hello,

I have a docksite with document windows inside:

<docking:DockSite x:Name="styleDocumentDockSite"
                  AreNewTabsInsertedBeforeExistingTabs="False" DocumentItemContainerStyle="{StaticResource DockingWindowStyle}"
                  DocumentItemsSource="{Binding Tabs, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" >
            <docking:Workspace>
                <docking:TabbedMdiHost TabStripPlacement="Left"/>
            </docking:Workspace>
        </docking:DockSite>

With such TabStripPlacement set to Left, how can I achieve (like in Visual Studio):

- the tab header to have an initial width?

- to have some splitter, so user can resize the tab header to left/right?

Of course, these should not affect when the TabStripPlacement is changed to other value.

Thanks for any help.

 

Comments (7)

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

Hello,

The product does support left/right tabstrip placement at this time but there is no resizing support for the tabs.  While we don't have properties for tab size ranges published on TabbedMdiHost now, if you want a fixed width for the tabs, you can include a Style like this in your App.Resources:

<Style TargetType="docking:TabbedMdiContainer">
	<Setter Property="MinTabExtent" Value="200" />
	<Setter Property="MaxTabExtent" Value="200" />
</Style>

I will log your suggestions as a possible future enhancement.


Actipro Software Support

Posted 4 years ago by Procam
Avatar

Thanks for the answer. It works correctly for Top and Bottom positions. But as we have

TabStripPlacement="Left"

so it displays the tab header as a big rectangle. How to set the width for the TabStrip in the left position?

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

Which version are you running?  I seem to remember a bug we fixed a while back, where the tab extents controlled tab height in Left position. 

But yesterday, I had tested the tab extents in our latest codebase here and it seemed to control the tab width in Left position.  You may want to try the latest version if you haven't already.


Actipro Software Support

Posted 4 years ago by Procam
Avatar

We have v18.1.0671. So will update to the newest version and see.

Posted 4 years ago by Procam
Avatar

I would like to change the TabStripPlacement value in runtime? In the code I have:

<docking:TabbedMdiHost HasTabImages="True" x:Name="tabbedMdiHost">
                    <docking:TabbedMdiHost.TabStripPlacement>
                        <MultiBinding Converter="{StaticResource CustomDockToSystemDockConverter}">
                            <Binding Path="SelectedCustomDock"></Binding>
                            <Binding ElementName="tabbedMdiHost"></Binding>
                        </MultiBinding>
                    </docking:TabbedMdiHost.TabStripPlacement>
                </docking:TabbedMdiHost>

and when the SelectedCustomDock is changed (to Side.Left or Side.Top), so the converter should use the tabbedMdiHost to set e.g.:

tabbedMdiHost.TabbedMdiContainer.MinTabExtent = 30 (or 200).

But you mentioned in one previous post that properties for tab size ranges are not published on TabbedMdiHost. It means I have no access to the desired property. There is some other way how I could change the size in runtime?

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

Hello,

Unfortunately the MinTabExtent/MaxTabExtent properties aren't on TabbedMdiHost yet, so there isn't an easy way to set those and have it bind down to all the associated TabbedMdiContainers.  We will work on adding those for the next maintenance release for you.  Does that sound good?


Actipro Software Support

Posted 4 years ago by Procam
Avatar

Yes, sounds good. So will wait for the next maintenance release.

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

Add Comment

Please log in to a validated account to post comments.