Beispiel #1
0
        public override void PaintSideBar(SideBarRendererEventArgs e)
        {
            Graphics g = e.Graphics;
            SideBar sb = e.SideBar;
            Office2007SideBarColorTable ct = m_ColorTable.SideBar;
            LinearGradientColorTable background = ct.Background;
            //if (sb.BackColor != SystemColors.Control)
            //{
            //    background.Start = sb.BackColor;
            //    background.End = Color.Empty;
            //}

            Rectangle r = new Rectangle(Point.Empty, sb.Size);
            DisplayHelp.FillRectangle(g, r, background);

            Color border = ct.Border;

            DisplayHelp.DrawRectangle(g, border, r);

            base.PaintSideBar(e);
        }
Beispiel #2
0
        /// <summary>
        /// Draws the SideBar control. 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 OnRenderSideBar method so events can occur.
        /// </summary>
        /// <param name="e">Provides context information.</param>
        public override void DrawSideBar(SideBarRendererEventArgs e)
        {
            SideBarPainter painter = PainterFactory.CreateSideBarPainter();

            if (painter == null)
                return;

            if (painter is IOffice2007Painter)
                ((IOffice2007Painter)painter).ColorTable = m_ColorTable;

            painter.PaintSideBar(e);

            base.DrawSideBar(e);
        }
Beispiel #3
0
 public virtual void PaintSideBar(SideBarRendererEventArgs e){}
Beispiel #4
0
 /// <summary>
 /// Draws the SideBar control. 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 OnRenderSideBar method so events can occur.
 /// </summary>
 /// <param name="e">Provides context information.</param>
 public virtual void DrawSideBar(SideBarRendererEventArgs e)
 {
     OnRenderSideBar(e);
 }
Beispiel #5
0
 /// <summary>
 /// Raises RenderSideBar event.
 /// </summary>
 /// <param name="e">Provides context information.</param>
 protected virtual void OnRenderSideBar(SideBarRendererEventArgs e)
 {
     if (RenderSideBar != null)
         RenderSideBar(this, e);
 }