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

Using the BeginGroup property on a BarItemLink

Nov 29, 2007 at 7:49 PM
Hi all!

I have successfully built a project around the CABDevExpress extension kit. I am using the DevExpress XtraBars suite, and the XtraBarUIAdapterFactory to create BarButtonItems on the Application's ToolStrip.

I have had several requests to be able to use the BeginGroup Property on the BarButtonItem's links after they are added to the Toolstrip. Is there a way to gain access to the BarItemLink's BeginGroup when adding a button through the AdapterFactory?

Nov 2, 2008 at 8:06 PM

 The thubk is that BeginGroup is set when the BarButtonItem is added to the group link collection. What the CABDevExpress does is:
linkCollection.Insert(GetInsertingIndex(uiElement), uiElement); (file BarLinksCollectionUIAdapter:35)
 so we must have something like:
linkCollection.Insert(GetInsertingIndex(uiElement), uiElement);
But this breaks the other element on the ribbon.

My solution (not very pround of it), I send a value in the uiElement.Tag to let know when to use Add(.., true).

Let me know if you can think of a better one,