Custom Tab Grouping

Docking/MDI for WPF Forum

Posted 9 years ago by James LaPenn - Senior Software Engineer, Loomis, Sayles, Company, L.P.
Version: 10.1.0520
Avatar

I'm looking to implement custom tab grouping for the ToolWindowTabPanel.

My assumption is that in order to do this, I would need to write a custom ControlTemplate for the ToolWindowTabPanel but I lack the necessary information to do so. I would also rather not build up an entirely new tab control as I don't want to have to re-create all the existing functionality to add a single new feature.

Is there a base ControlTemplate available for the ToolWindowTabPanel?

I tried to figure out how to extract the ControlTemplate but could not find a way to do so.

Comments (8)

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

Hi James,

I'm not sure you would be able to add that feature on your own.  That being said, we are currently working on a huge overhaul of the Docking/MDI internals so that we can provide a lot of new features and functionality.  If you can describe in detail what you are trying to achieve (perhaps with some screenshots) then we can lot it as a suggestion.


Actipro Software Support

Posted 9 years ago by James LaPenn - Senior Software Engineer, Loomis, Sayles, Company, L.P.
Avatar

This is fine, in evaluating your most recent version of the library I think we are going to upgrade our license.

I am concerned about layout support breaking, my evaluation didnt' reveal any significant issues, can I expect that to continue with this big update?

As far as what I'm trying to do.  I have a situation where we can have around 50 tabs in a container, This obviously makes the tab text/content basically unusuable.  We already have a drop list, and I see in the latest versions there is scrolling, but I suspsect that these are not features all my users will want to use.

I wanted to add another option where virtual tabs can be created, which would be a collection of other tabs that is hidden until the virtual tab is selected and all the tabs it's responsible for replace the virtual tab.

When selection between two of these virtual tabs changes, the revealed tab's collection will be hidden back in the virtual tab, and the new set of tabs would be revealed.

Ideally, virtual tabs an normal tabs could be mixed together.

I haven't gotten further than this because I haven't really had the chance to prototype the funcitonality. I wasn't interested in building a new tab system from the ground up as I'd likely run into many gotchas along the way to reaching feature parity.

However I'd be willing to build a non-actipro based example of the functionality if that is desired for more clarity, please let me know.

If you do plan to implement such a feature then please let me know as it affects my development schedule.

On a side note, I'm not sure if it's a popular feature, but it'd also be nice to have the option to wrap tabs to allow for multiple tab rows.

[Modified 9 years ago]

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

Hi James,

If you are referring to layout data XML files, we haven't gotten to that area of updates as of yet but expect it to be able to support reading (or importing if there are changes) the same file format.

For the tabs question, could you provide a simplified XAML tree that shows what you are currently doing so that we have a clear understanding?  I wouldn't recommend putting the main tabs in the same control as virtual tabs as that would seem confusing to end users.  Having some higher level toggle, whether it be some toggle buttons, or some other UI outside of the main tab presentation where the numerous tabs are, would be more ideal for toggling which tabs are visible.

In our product, to control tab visibility, and assuming are using tool windows for them, you would need to Open() and Close() the tabs when appropriate.  That adds/removes them respectively from the layout.


Actipro Software Support

Posted 9 years ago by James LaPenn - Senior Software Engineer, Loomis, Sayles, Company, L.P.
Avatar

Unfortunately we cannot use Open and Close in our solution, because as you stated it removes the tabs from the layout, which we don't want. The tabs should always be part of the layout so they can be serialized out. Additionally, this removes the ToolWindows from the visual tree which disconnects it's content as well, as a result it disposes 3rd party controls which we need to not be disposed.  I realize this is also a problem with the TabControl, and we work around this in ActiPro by activating all the tabs one they are all created (this is hacky, having a way to handle this in a cleaner fassion would be great).

Having a higher level toggle might work, but it really doesn't change the issue, which is that I need a way to manage the display of the tabs . The tab container should be blendable and shouldn't be difficult to achieve and is a core facet of WPF/XAML design conventions. 

The situation I'm describing should be fairly easy to implement if I had access to a ControlTemplate for the tab container.

I dont' have an example as we are not currently supporting this feature.  We need this feature because we have a situation where users end up with 40-50 tabs that have a single character as content wiht the rest clipped by the tab bounds.

We plan on providing Scrolling as an option, but I know this will not suffice for a lot of users. We want to provide grouping in a single panel as an option as well.

 

The tab groups would be setup by expert users for other users, so the end users are specifically part of the creation of these tab groups and are trained on the tool changes that are relevant to their experience.

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

Hi James,

If you write our support address and mention this thread, we can get you the default styles/templates.  In the email, please let us know which version you are using and your license info.


Actipro Software Support

Posted 9 years ago by James LaPenn - Senior Software Engineer, Loomis, Sayles, Company, L.P.
Avatar

What information do I need to include for the license info.  The licensee and the key?

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

Yes, and make sure you email it to our support address (don't post here in the forums).


Actipro Software Support

Answer - Posted 9 years ago by James LaPenn - Senior Software Engineer, Loomis, Sayles, Company, L.P.
Avatar

Okay, after looking into this further with a bit of help from support I realize that I made a mistake in determining how I can replace the ToolWindowTabPanel.  Since this is a panel we can simply we replace it with any other Panel that can be an items host.

Thank you for the assistance

The latest build of this product (v24.1.1) 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.