Beispiel #1
0
        private DevComponents.DotNetBar.RibbonBar GetRibbonBar(NavigationTabBar tabBar)
        {
            DevComponents.DotNetBar.RibbonBar ribbonBar = new DevComponents.DotNetBar.RibbonBar();
            ribbonBar.AutoOverflowEnabled = true;
            ribbonBar.Dock = System.Windows.Forms.DockStyle.Left;

            foreach (NavigationTabItem buttonItem in tabBar)
            {
                DevComponents.DotNetBar.ButtonItem button = GetRibbonButton(buttonItem, false);
                if (button.Enabled)
                {
                    ribbonBar.Items.Add(button);
                }
            }

            ribbonBar.LicenseKey   = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
            ribbonBar.Location     = new System.Drawing.Point(3, 0);
            ribbonBar.Size         = new System.Drawing.Size(519, 64);
            ribbonBar.Style        = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
            ribbonBar.TabIndex     = 1;
            ribbonBar.Text         = tabBar.ShowName ? tabBar.Name : "";
            ribbonBar.TitleVisible = true;

            return(ribbonBar);
        }
 public new NavigationTabBar this[string name]
 {
     get
     {
         IEnumerator enumerator = this.GetEnumerator();
         while (enumerator.MoveNext())
         {
             NavigationTabBar item = (NavigationTabBar)enumerator.Current;
             if (item.Name == name)
             {
                 return(item);
             }
         }
         return(null);
     }
 }