public override void PaintButtonBackground(NavPaneRenderEventArgs e) { Graphics g = e.Graphics; Rectangle r = e.Bounds; Office2007NavigationPaneColorTable ct = m_ColorTable.NavigationPane; using (Brush brush = DisplayHelp.CreateBrush(r, ct.ButtonBackground)) { g.FillRectangle(brush, r); } }
/// <summary> /// Draws the Navigation Pane button background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you /// do not want default rendering to occur do not call the base implementation. You can call OnRenderNavPaneButtonBackground method so events can occur. /// </summary> /// <param name="e">Provides context information.</param> public override void DrawNavPaneButtonBackground(NavPaneRenderEventArgs e) { NavigationPanePainter painter = PainterFactory.CreateNavigationPanePainter(); if (painter == null) return; if (painter is IOffice2007Painter) ((IOffice2007Painter)painter).ColorTable = m_ColorTable; painter.PaintButtonBackground(e); base.DrawNavPaneButtonBackground(e); }
public abstract void PaintButtonBackground(NavPaneRenderEventArgs e);
/// <summary> /// Draws the Navigation Pane button background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you /// do not want default rendering to occur do not call the base implementation. You can call OnRenderNavPaneButtonBackground method so events can occur. /// </summary> /// <param name="e">Provides context information.</param> public virtual void DrawNavPaneButtonBackground(NavPaneRenderEventArgs e) { OnRenderNavPaneButtonBackground(e); }
/// <summary> /// Raises RenderNavPaneButtonBackground event. /// </summary> /// <param name="e">Provides context information.</param> protected virtual void OnRenderNavPaneButtonBackground(NavPaneRenderEventArgs e) { if (RenderNavPaneButtonBackground != null) RenderNavPaneButtonBackground(this, e); }