This project has moved. For the latest updates, please go here.


Dec 26, 2008 at 3:08 PM
Edited Dec 26, 2008 at 3:09 PM

Looking through the sample of how to use the ribbons I wonder why one must construct the menu's in code versus using the designer. In other projects (not using DevEx) I had a helper class which I registered as a Strategy in ObjectBuilder which would scan all controls of newly created objects for Ribbons/Menus/etc and automatically add them to the appropriate ExtensionSites or creating new ones as needed.

The biggest problem seems that constructing an EventName from a BarItem is hard, as there is no Key property present. So in this case the Name property would have to be used.

The idea would be that each ModuleInit would add a control (which will never be shown directly anywhere) with all menus/ribbons/context-menus etc, which would automatically be detected as described above.

regards, Tilli
Dec 26, 2008 at 5:24 PM
It is my understanding that the CAB DevExpress Extension Kit follows the CAB standard where menu items and buttons are created/hooked up in code. That said, the helper class that you mention sounds like an interesting utility. I see no reason that a similar helper class wouldn't work. If you come up with one that you can share, it would be a nice optional addition to the library.

Dec 26, 2008 at 6:18 PM

Hi DevLynx,

thanks for the info. Yes, but the CAB assumes “simple” Menus. With RibbonPages, Groups, etc. it gets complicated and hard to see what the menu will look like until you run the application.

I will be glad to send you my code once completed with it.

Regards, Tilli