public QatToolbar() { m_ItemContainer = new CaptionItemContainer(); m_ItemContainer.GlobalItem = false; m_ItemContainer.ContainerControl = this; m_ItemContainer.WrapItems = false; m_ItemContainer.EventHeight = false; m_ItemContainer.UseMoreItemsButton = false; m_ItemContainer.Stretch = true; m_ItemContainer.Displayed = true; m_ItemContainer.SystemContainer = true; m_ItemContainer.PaddingTop = 0; m_ItemContainer.PaddingBottom = 0; m_ItemContainer.ItemSpacing = 0; m_ItemContainer.SetOwner(this); m_ItemContainer.PaddingBottom = 0; m_ItemContainer.PaddingTop = 0; m_ItemContainer.ItemSpacing = 1; m_ItemContainer.TrackSubItemsImageSize = false; //m_ItemContainer.ToolbarItemsAlign = eContainerVerticalAlignment.Middle; this.SetBaseItemContainer(m_ItemContainer); m_ItemContainer.Style = eDotNetBarStyle.Office2007; }
/// <summary> /// Creates new instance of the class and initializes it with the parent RibbonStrip control. /// </summary> /// <param name="parent">Reference to parent RibbonStrip control</param> public MetroStripContainerItem(MetroTabStrip parent) { _TabStrip = parent; // We contain other controls m_IsContainer = true; this.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; _ItemContainer = new MetroTabItemContainer(); _ItemContainer.ContainerControl = parent; _ItemContainer.GlobalItem = false; _ItemContainer.WrapItems = false; _ItemContainer.EventHeight = false; _ItemContainer.UseMoreItemsButton = false; _ItemContainer.Stretch = true; _ItemContainer.Displayed = true; _ItemContainer.SystemContainer = true; _ItemContainer.PaddingTop = 0; _ItemContainer.PaddingBottom = 0; _ItemContainer.PaddingLeft = 0; _ItemContainer.ItemSpacing = 1; _CaptionContainer = new CaptionItemContainer(); _CaptionContainer.ContainerControl = parent; _CaptionContainer.GlobalItem = false; _CaptionContainer.WrapItems = false; _CaptionContainer.EventHeight = false; _CaptionContainer.EqualButtonSize = false; _CaptionContainer.ToolbarItemsAlign = eContainerVerticalAlignment.Top; _CaptionContainer.UseMoreItemsButton = false; _CaptionContainer.Stretch = true; _CaptionContainer.Displayed = true; _CaptionContainer.SystemContainer = true; _CaptionContainer.PaddingBottom = 0; _CaptionContainer.PaddingTop = 0; _CaptionContainer.PaddingLeft = 6; _CaptionContainer.ItemSpacing = 1; _CaptionContainer.TrackSubItemsImageSize = false; _CaptionContainer.ItemAdded += new EventHandler(this.CaptionContainerNewItemAdded); this.SubItems.Add(_CaptionContainer); this.SubItems.Add(_ItemContainer); _Settings = new ButtonItem("sysSettingsButton"); _Settings.Text=DefaultSettingsButtonText; //_Settings.HotTrackingStyle = eHotTrackingStyle.None; _Settings.ItemAlignment = eItemAlignment.Far; _Settings.Click += new EventHandler(SettingsButtonClick); _Settings.SetSystemItem(true); _Settings.CanCustomize = false; _CaptionContainer.SubItems.Add(_Settings); _Help = new ButtonItem("sysHelpButton"); _Help.Text = DefaultHelpButtonText; _Help.SetSystemItem(true); _Help.CanCustomize = false; //_Help.HotTrackingStyle = eHotTrackingStyle.None; _Help.ItemAlignment = eItemAlignment.Far; _Help.Click += new EventHandler(HelpButtonClick); _CaptionContainer.SubItems.Add(_Help); SystemCaptionItem sc = new SystemCaptionItem(); sc.RestoreEnabled = false; sc.IsSystemIcon = false; sc.ItemAlignment = eItemAlignment.Far; _CaptionContainer.SubItems.Add(sc); _SystemCaptionItem = sc; }