Beispiel #1
0
        private void addItemToBar(DevExpress.XtraBars.Bar sourceItem, DevExpress.XtraBars.BarItem newItem)
        {
            DevExpress.XtraBars.BarItemLink linkForDelete = null;
            foreach (DevExpress.XtraBars.BarItemLink link in sourceItem.ItemLinks)
            {
                if (link.Caption == newItem.Caption)
                {
                    linkForDelete = link; break;
                }
            }
            if (linkForDelete != null)
            {
                sourceItem.RemoveLink(linkForDelete);
            }

            int newID = sourceItem.ItemLinks.Count;

            newItem.Id = newID;
            sourceItem.AddItem(newItem);
        }
 public BarSubItemLinkViewInfo(DevExpress.XtraBars.ViewInfo.BarDrawParameters parameters, DevExpress.XtraBars.BarItemLink link) : base(parameters, link)
 {
 }
Beispiel #3
0
 private bool IsVisible(DevExpress.XtraBars.BarItemLink itemLink)
 {
     return((itemLink.Item.Visibility == DevExpress.XtraBars.BarItemVisibility.Always || itemLink.Item.Visibility == DevExpress.XtraBars.BarItemVisibility.OnlyInRuntime) && itemLink.Visible);
 }