Merging menu from selected document into the main menu

Docking/MDI for WPF Forum

Posted 4 years ago by Jorgen
Version: 17.2.0

Hi. Maybe this is a trivial question or a general WPF question, but I'm new to WPF and now I'm using Actipro WPF Controls for my first serious project.

I'm creating an IDE and wish to have the menu populated with document(-type) specific menu items, like when you change between different document types in Visual Studio.

I have been searching the net, and only found solutions for WinForms and competing WPF libraries.

Is there a formal solution for this in the Actipro WPF library ?

Forgive me if this is described in the documentation.

Best regards,

Comments (2)

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

Hi Jan,

We don't have any custom bar controls at this time.  It's something we have had requests for and might add in the future.  But you could probably achieve this with regular MenuItems.  You could just vary the Visibility of the MenuItems based on their document type.  The DockSite.PrimaryDocument property will tell you the primary document and there is a related PrimaryDocumentChanged event you can handle to know when it's changed.  Update the MenuItem Visibility in that event handler.

Actipro Software Support

Posted 4 years ago by Jorgen

Allright. I'm sure I can make it work.

Farther down the road I would like to support addons extending my application with custom document types, and then it would be necessary with a system where the document window can easily add its menuitems to the main menu.

I haven't dug deep into this yet, I just thought there would be a better solution for this than the MergeIndex in WinForms, but for some reason there's no standard solution in WPF...

It would be a nice future feature of the Actipro WPF Library :-)


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