ComponentFactory.Krypton.Toolkit.ViewControl.OnPaint C# (CSharp) Метод

OnPaint() защищенный Метод

Raises the Paint event.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs A PaintEventArgs that contains the event data.
Результат void
        protected override void OnPaint(PaintEventArgs e)
        {
            // Cannot process a message for a disposed control
            if (!IsDisposed && !Disposing && !RootInstance.IsDisposed)
            {

                // Do we need to paint the background as the foreground of the parent
                if (TransparentBackground)
                    PaintTransparentBackground(e);

                // Give handles a change to draw the background
                if (PaintBackground != null)
                    PaintBackground(this, e);

                // Create a render context for drawing the view
                using (RenderContext context = new RenderContext(GetViewManager(),
                                                                 this,
                                                                 RootInstance,
                                                                 e.Graphics,
                                                                 e.ClipRectangle,
                                                                 Renderer))
                {
                    // Ask the view to paint itself
                    _viewLayout.ChildView.Render(context);
                }
            }
        }