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

Ribbon Page Categories & Removing Pages

Sep 2, 2008 at 8:45 PM


I'm using the CabDevExpress.Extensions library in my application a I need to create page categories with the contextual pages (dynamically created). So I created the RibbonPageCategoryCollectionUIAdapter class (similar to RibbonPageCollectionUIAdapter) for this purpose. This UI adapter provided the ability to add or remove page categories to the ribbon control.

I also have in my application one default category whose collection of pages I need to register to the UIExtensions. I'm using your RibbonPageCollectionUIAdapter for this - I register the RibbonPageCategory.Pages collection. Everything works fine except for removing pages. Every page which category is unassigned is in the Ribbon.Pages collection. But pages which category is assigned (contextual pages) is not in the Ribbon.Pages collection. So the following code for removing pages from RibbonPageCollection does nothing.

  protected override void Remove(RibbonPage uiElement)
Guard.ArgumentNotNull(uiElement, "RibbonPage");

if (uiElement.Ribbon != null)
// not sure why this doesn't use ribbonPageCollection.Remove()

You wonder why you do not use the ribbonPageCollection.Remove() method. I wonder too :) If I used the ribbonPageCollection.Remove() method everything works fine.

So, what is the main reason for using this code for page removing?


Regards, Jan Manek.

Sep 3, 2008 at 1:23 AM

I have not used this portion of the Extension Kit nor have I used the Remove functionality of CAB. However, if I remember correctly, the original version of the DevEx ribbon did not contain contextual tab pages or page categories. So it's possible that this code was written prior to these enhancements which broke the functionality. Or it could just be a bug. I'll be happy to make the fix. Please send me the fixed code and I'll check it in. I'll let this issue sit for a few days prior to checking in the change so that if there are any reasonable objections we can reevaluate.

Thanks for bringing up the issue,

Sep 3, 2008 at 6:10 AM


I put my changes in the zip-archive at the link below. There are two changes in it:

Change 1: Support for the ribbon page categories. Fixes in the page and page group removing rutine.

Change 2: Support for setting the (unique) workspace name at XtraTabWorkspace which is also set to its tab page  (used for example for identifying the active workspace where the selected tabpage is changed etc.)


Have a nice day.

Jan Manek.

Sep 11, 2008 at 3:45 AM

I have your changes incorporated into my baseline. I'll check them in this weekend. Thanks for your patience.

Nov 11, 2008 at 4:19 PM
Hi DevLynx,
I couldn't find those changes on SVn. Could you please, check out this again.


Nov 25, 2008 at 4:27 AM
I apologize for not responding earlier. I was out for two weeks and then took some time to catch up. I'll see if I can't get these changes in on Wednesday.

Mar 15, 2009 at 8:14 PM

I would realy like to see your changes. But the link is not working anymore.

Can you please resend it ?

Thank you very much.