示例#1
0
        /// <summary>
        /// Raises the Paint event.
        /// </summary>
        /// <param name="e">A PaintEventArgs that contains the event data.</param>
        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
                PaintBackground?.Invoke(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
                    ViewLayoutControl.ChildView.Render(context);
                }
            }
        }
 private void OnTabsPaintBackground(object sender, PaintEventArgs e)
 {
     PaintBackground?.Invoke(sender, e);
 }
示例#3
0
 private void OnViewControlPaintBackground(object sender, PaintEventArgs e)
 {
     PaintBackground?.Invoke(sender, e);
 }