Esempio n. 1
0
        internal override bool Render(UIElement element, PdfRenderContext context)
        {
            var border = element as System.Windows.Controls.Border;

            if (border == null)
            {
                return(false);
            }

            if (IsSimpleStrokeThickness(border.BorderThickness))
            {
                RectangleRenderer.DrawRectangle(context, border.Background, border.BorderBrush, border.BorderThickness.Left, border.ActualWidth, border.ActualHeight, null);
            }
            else
            {
                DrawBackground(context, border.Background, border.BorderThickness, border.ActualWidth, border.ActualHeight);
                DrawBorderStroke(context, border.BorderThickness, border.BorderBrush, border.ActualWidth, border.ActualHeight);
            }

            UIElement firstChild = border.Child;

            context.facade.Render(firstChild, context);

            return(true);
        }
Esempio n. 2
0
        internal override bool Render(UIElement element, PdfRenderContext context)
        {
            Panel panel = element as Panel;

            if (panel == null)
            {
                return(false);
            }

            RectangleRenderer.DrawRectangle(context, panel.Background, null, 0, panel.ActualWidth, panel.ActualHeight, null);

            return(base.Render(panel, context));
        }