I have some docked controls in my application which have an own menu (added to the main menu with ImportBarItems).
1. I have several instances for the same control. Is it possible to merge the menus of all instances to one parent bar item? (each of the instances have a "Edit" menu but only one "Edit" entry should appear in the mainmenubar) I tried the merge type "Replace" but then the menu is only for the "last imported menu".
2. If one control is closed the menu should disappear too. Is there a way to remove the menu from the mainmenubar?
3. Only if a control is active the corresponding menu should appear in the mainmenubar.
I would like put my vote on such functionality as well for a next version of XPMenu's.
As this is not available currently anywhere in Winforms or Syncfusion, we are building a limited framework ourselves that allows us to create an data driven resource file (a la motlib from an older MSDN magazine article), that allows us to specify
- UI commands (with caption, icon, help text)
- UI elements (barItems, with hierarchy to specify menus and toolbars, as well as the context in which each item should appear).
- a utility class used to map UI elements to pre-existing bar managers and bars and context menu’s. By refreshing the manager class every time a the UI context changes (ie, a docking window or mdi child is activated), the appropriate barItems are merged/removed from the main window's menu/tool-bars.
Why do this:
- Separation of commands and UI-elements (btw Motlib implements this very poorly)
- More flexible ways of context dependent menu items and toolbar buttons (not only a single-level mdi child context such as currently in XPMenus, but also by current tab-page/user control/etc). Sharing commands between context menu's in user controls and barItems in the main form is also missing from XPMenu's currently.
- Data driven. Hundreds of barItems in code and spread over multiple forms/controls/context menus is not a good idea.
- MFC-like idle time updating (optionally..). This can then also be used to selectively enable menu items dependent on current context.
RPRamesh Praveen Syncfusion Team July 16, 2003 02:57 PM
I will get back to you soon regarding your questions and issues.
RPRamesh Praveen Syncfusion Team July 17, 2003 02:30 PM
I figure that in essence what you are looking for is the ability to associate Bars and BarItems with a UserControl (or any other Control) and merge those with that of the Form's Bars and menus during runtime. "Merging" would also mean that these merged bar items would be "active" only when the corresponding child-control is active.
Basically, our ChildFrameBarManager support for mdi child forms extended to UserControls.
This has been on top of our feature request list and we will begin work on this very soon.
You can track QA incident 197 for updates on this feature request.
PEPeterJuly 18, 2003 12:36 AM
Sounds nice. Is there a timetable when this feature is integrated?
RPRamesh Praveen Syncfusion Team July 18, 2003 10:57 AM
I would say in the next 2 months.
PEPeterMarch 23, 2004 05:50 AM
I wonder if this feature is added one of the current versions. Can you please give me an update on this issue?
ADAdministrator Syncfusion Team March 23, 2004 03:18 PM
I am afraid, the above mentioned feature has not been implemented yet. However, we have considered it as a high priority issue and will try our best to implement this feature at the earliest. I will notify you when we accomplish the same. We appreciate your patience and cooperation.
DEDerrickMarch 3, 2008 09:47 AM
It's now 2008, has this been implemented as this is exactly what I'm trying to accomplish right now with version 6.102 and I'm not finding the right method calls. Thanks