예제 #1
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);
            }
        }
예제 #2
0
 public abstract void RenderViewHostFooter(ViewHostFooter footer, PaintEventArgs e);
예제 #3
0
파일: ViewHost.cs 프로젝트: Kuzq/gitter
        /// <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,
                };
            }
        }
예제 #4
0
파일: ViewHost.cs 프로젝트: Kuzq/gitter
 /// <summary>Destroys footer control.</summary>
 private void RemoveFooter()
 {
     if(_footer != null)
     {
         _footer.Parent = null;
         _footer.Dispose();
         _footer = null;
     }
 }
예제 #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);
            }
        }
예제 #6
0
 public override void RenderViewHostFooter(ViewHostFooter footer, PaintEventArgs e)
 {
 }
예제 #7
0
파일: ViewRenderer.cs 프로젝트: Kuzq/gitter
 public abstract void RenderViewHostFooter(ViewHostFooter footer, PaintEventArgs e);