Menu/Toolbar management for multiple DocumentWindow types

Docking/MDI for WPF Forum

Posted 10 years ago by Cheetah
Version: 9.1.0503
Avatar
I'm starting to migrate a WinForms MDI app to Actipro's Docking library, and as I look over the things I need to do, most of it looks like it will be pretty easy, the one major head scratching topic I'm seeing is management of menus and the toolbar.

My WinForms app makes (basic) use of the menu and toolbar merging functionalities in WinForms. In my case, I have menus/menuitems and a toolbar with items that are associated with the parent window, and accessible even with no "document" open. I then have two child window types that each have menu and toolbar items to merge.

Googling around, I see lots of people wondering how to do something like this in WPF in other contexts, and not much in the way of answers, certainly not simple ones.

Does anyone have any patterns or practices or helper libraries to deal with this type of problem? I'm open to solutions to the underlying issue that aren't direct copies of the WinForms technique.

I'd very much like to avoid coding the menus for the different document types into the parent window, since there are probably going to be additional child window types in the future, and one of the WinForms child window types can be opened as a top level window of its own, with its own menus and toolbar, and if its menu items are in a different class, supporting that is pretty hard.

Comments (1)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
You can use the various WindowX events off DockSite to know when a docking window gets focus, etc. and then update the menu/toolbars based on that. But as for a pattern, we don't have anything for that here. If we build a more advanced toolbar product down the road, merging is something we'll look into.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) 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.