This project has moved and is read-only. For the latest updates, please go here.

UIExtensionSite BeginGroup

Sep 9, 2008 at 9:57 AM
Hello,

How to add BarButtonItem to the UIExtensionSite and set link BeginGroup property to true?
I would like add separator between buttons in the bar.


Sep 9, 2008 at 12:26 PM
Found solution:

_rootWI.UIExtensionSites.RegisterSite("SiteName", BarManager1);

DevExpress.XtraBars.Bar _bar = new DevExpress.XtraBars.Bar();

_bar.Offset = 100;
 _bar.Text = "_bar";
 _bar.DockCol = 10;
 _bar.DockRow = 1;
_bar.DockStyle = DevExpress.XtraBars.BarDockStyle.Left;
_bar.Visible = false;
_bar.BarName = "_bar";

DevExpress.XtraBars.BarButtonItem _but1 = new DevExpress.XtraBars.BarButtonItem();
_but1.Caption = "But1";
_but1.Id = 100;
_but1.Name = "_but1";

DevExpress.XtraBars.BarButtonItem _but2 = new DevExpress.XtraBars.BarButtonItem();
_but2.Caption = "But2";
_but2.Id = 200;
_but2.Name = "_but2";

_bar.ItemLinks.Add(_but1);
_bar.ItemLinks.Add(_but2, true);  //BeginGroup = true, adds separator

_rootWI.UIExtensionSites["SiteName"].Add(_bar);
         
_bar.Visible = true;  //Make visible on Shell form