How to identify if tabstrip has no room left for toolwindow tabs to display in tabbedmdicontainer

Docking/MDI for WPF Forum

Posted 3 years ago by Harsh Chawla
Version: 16.1.0636
Avatar

How to identify if tabstrip has no room left for  toolwindow tabs to display  in tabbedmdicontainer , is there any property like IsOverFlow to detect overflow of toolwindow tabs  in tabbedmdicontainer. How we can customize the overflow behaviour other than the options you are providing.

Please provide solution if any asap.

Thanks

Comments (3)

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

Hi Harsh,

Both the TabbedMdiContainer and ToolWindowContainer controls use an AdvancedTabControl in their templates.  AdvancedTabControl is a control that provides all the tabbed UI, including handling overflow.  That control has an IsOverflowed property that returns true if there are tabs that are overflowed.  AdvancedTabControl has the TabOverflowBehavior property defined, which both TabbedMdiContainer and ToolWindowContainer set with their related properties.  AdvancedTabControl also has a AdvancedTabPanel that is used in its ItemsPanelTemplate, and that reads the TabOverflowBehavior, and adjusts the tab sizing appropriately.

To customize the tab layout behavior, you'd probably effectively want to update the ItemsPanel property to a custom Panel for the AdvancedTabControl used in the containers.  You might be able to do that with an implicit Style that targets AdvancedTabControl and sets the ItemsPanel property with an ItemsPanelTemplate that contains your special Panel.  Please note that I believe your custom Panel might need to inherit our AdvancedTabPanel control.


Actipro Software Support

Posted 2 years ago by Harsh Chawla
Avatar

Can you please provide a sample code for custom Panel which inherits AdvancedTabPanel control and which has the property to tell the overflow of toolwindow tabs.

Thanks

[Modified 2 years ago]

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

Hello,

You generally tell overflow in panels if the items you arrange in ArrangeOverride exceed the size passed into ArrangeOverride.  That's how all WPF Panels work.

[Modified 2 years ago]


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.