Bloom.ToPalaso.BetterTooltipTransparentOverlay.OnPaint C# (CSharp) Method

OnPaint() protected method

protected OnPaint ( PaintEventArgs e ) : void
e System.Windows.Forms.PaintEventArgs
return void
        protected override void OnPaint(PaintEventArgs e)
        {
            if (Parent == null)
                return;

            // Draw the control we're overlaying. On Linux it might not show properly
            // otherwise, especially since it is disabled.
            using (var behind = new Bitmap(Parent.ClientSize.Width, Parent.ClientSize.Height))
            {
                _overlayedControl.DrawToBitmap(behind, _overlayedControl.Bounds);
                e.Graphics.DrawImage(behind, 0, 0);
            }
        }
BetterTooltipTransparentOverlay