/// <summary> /// Creates the new toolbar. /// </summary> /// <param name="bars">The parent container.</param> /// <param name="name">The name for the toolbar.</param> internal Toolbar(Toolbars bars, string name) : base(null) { this.toolbars = bars; base.Caption = name; this.position = MsoBarPosition.msoBarFloating; InternalTag = "UIManager_" + TOOLBAR_TAG; TOOLBAR_TAG++; }
/// <summary> /// Occurs when a new window has been opened. /// </summary> /// <remarks> /// Applies the necessary user interface to the window. /// </remarks> /// <param name="window">The window that has just opened.</param> protected void OnWindowOpen(OfficeWindow window) { Toolbars bars = GetWindowToolbars(window); bars.Apply(window); if (WindowOpen != null) { WindowOpen(window); } }