public override void RenderViewHostFooter(ViewHostFooter footer, PaintEventArgs e)
        {
            var graphics = e.Graphics;

            using (var brush = new SolidBrush(ColorTable.ViewHostFooterBackground))
            {
                graphics.FillRectangle(brush, e.ClipRectangle);
            }
            var color = footer.ViewHost.IsActive ?
                        ColorTable.ViewHostForegroundActive :
                        ColorTable.ViewHostForegroundNormal;

            using (var brush = new SolidBrush(color))
            {
                var rc = (RectangleF)footer.ClientRectangle;
                rc.X      -= 0.5f;
                rc.Y      -= 0.5f;
                rc.Width  += 1;
                rc.Height += 1;
                graphics.FillRoundedRectangle(brush, rc, 0, 0, 2, 2);
            }
        }
Example #2
0
 public abstract void RenderViewHostFooter(ViewHostFooter footer, PaintEventArgs e);
Example #3
0
        /// <summary>Creates <see cref="ViewHostFooter"/> control.</summary>
        /// <param name="size">Control size.</param>
        private void SpawnFooter(Size size)
        {
            Verify.State.IsTrue(_footer == null, "Footer is already spawned.");

            var footerHeight = Renderer.FooterHeight;
            if(footerHeight > 0)
            {
                _footer = new ViewHostFooter(this)
                {
                    Bounds = new Rectangle(
                        0, size.Height - footerHeight,
                        size.Width, footerHeight),
                    Anchor = ViewConstants.AnchorDockBottom,
                    Parent = this,
                };
            }
        }
Example #4
0
 /// <summary>Destroys footer control.</summary>
 private void RemoveFooter()
 {
     if(_footer != null)
     {
         _footer.Parent = null;
         _footer.Dispose();
         _footer = null;
     }
 }
Example #5
0
        public override void RenderViewHostFooter(ViewHostFooter footer, PaintEventArgs e)
        {
            var graphics = e.Graphics;

            using(var brush = new SolidBrush(ColorTable.ViewHostFooterBackground))
            {
                graphics.FillRectangle(brush, e.ClipRectangle);
            }
            var color = footer.ViewHost.IsActive ?
                ColorTable.ViewHostForegroundActive :
                ColorTable.ViewHostForegroundNormal;
            using(var brush = new SolidBrush(color))
            {
                var rc = (RectangleF)footer.ClientRectangle;
                rc.X -= 0.5f;
                rc.Y -= 0.5f;
                rc.Width += 1;
                rc.Height += 1;
                graphics.FillRoundedRectangle(brush, rc, 0, 0, 2, 2);
            }
        }
Example #6
0
 public override void RenderViewHostFooter(ViewHostFooter footer, PaintEventArgs e)
 {
 }
Example #7
0
 public abstract void RenderViewHostFooter(ViewHostFooter footer, PaintEventArgs e);