/// <summary> /// Overloaded. Raises the LayoutStyleChanged event /// </summary> /// <param name="e">Additional event info</param> protected override void OnLayoutStyleChanged(EventArgs e) { base.OnLayoutStyleChanged(e); switch (LayoutStyle) { case NaviLayoutStyle.Office2003Blue: // TODO break; case NaviLayoutStyle.Office2007Blue: renderer = new NaviBandRendererOff7(); renderer.ColorTable = new NaviColorTableOff7(); break; case NaviLayoutStyle.Office2007Black: renderer = new NaviBandRendererOff7(); renderer.ColorTable = new NaviColorTableOff7Black(); break; case NaviLayoutStyle.Office2007Silver: renderer = new NaviBandRendererOff7(); renderer.ColorTable = new NaviColorTableOff7Silver(); break; //case NaviLayoutStyle.Office2010: // // TODO renderer = new NaviButtonRendererOff10(); // break; } Invalidate(); }
/// <summary> /// Initializes the control for the first time. /// </summary> private void Initialize() { SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.ResizeRedraw, true); renderer = new NaviBandRendererOff7(); }
/// <summary> /// Initializes the control for the first time. /// </summary> internal void Initialize() { SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.ResizeRedraw, true); renderer = new NaviBandRendererOff7(); headerFont = new Font("Arial", 11F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0))); ResizeRedraw = true; }
/// <summary> /// Initializes the control for the first time. /// </summary> internal void Initialize() { SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.ResizeRedraw, true); renderer = new NaviBandRendererOff7(); clientArea = new NaviBandClientArea(); clientArea.Name = "ClientArea"; clientArea.Location = new Point(0, 0); clientArea.Size = Size; Controls.Add(clientArea); ResizeRedraw = true; }
/// <summary> /// Overriden. Raises the LayoutStyleChanged event and changes the colorstyle on /// childcontrols /// </summary> /// <param name="e">Additional event info</param> protected override void OnLayoutStyleChanged(EventArgs e) { base.OnLayoutStyleChanged(e); foreach (Control childControl in clientArea.Controls) { if (childControl is NaviControl) { ((NaviControl)childControl).LayoutStyle = LayoutStyle; } } switch (LayoutStyle) { case NaviLayoutStyle.Office2003Blue: // TODO break; case NaviLayoutStyle.Office2007Blue: renderer = new NaviBandRendererOff7(); renderer.ColorTable = new NaviColorTableOff7(); break; case NaviLayoutStyle.Office2007Black: renderer = new NaviBandRendererOff7(); renderer.ColorTable = new NaviColorTableOff7Black(); break; case NaviLayoutStyle.Office2007Silver: renderer = new NaviBandRendererOff7(); renderer.ColorTable = new NaviColorTableOff7Silver(); break; //case NaviLayoutStyle.Office2010: // // TODO renderer = new NaviButtonRendererOff10(); // break; } Invalidate(); }