Can't remove RibbonContextualTabGroup from parent

May 1, 2009 at 8:49 PM
Edited May 1, 2009 at 8:51 PM


I tried to separate a RibbonContextualTabGroup from it's parent, but it's failed. Here is my snippet:

RibbonContextualTabGroup rctg = plugin.Instance.RibbonContextualTabGroup;
if (rctg != null)
Ribbon parent = (Ribbon)plugin.Instance.RibbonContextualTabGroup.Parent;
if (parent != null)
ribbonMain.ContextualTabGroups.Add(rctg); // <-------- here i get the exection to separate element from parent

I'm using the same procedure for the RibbonTab's and here it works! Do you have any suggestions?

Thanks a lot! - Regards Cai