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); } }
public abstract void RenderViewHostFooter(ViewHostFooter footer, PaintEventArgs e);
/// <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, }; } }
/// <summary>Destroys footer control.</summary> private void RemoveFooter() { if(_footer != null) { _footer.Parent = null; _footer.Dispose(); _footer = null; } }
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); } }
public override void RenderViewHostFooter(ViewHostFooter footer, PaintEventArgs e) { }