public override void Visit(ExportRectangle exportRectangle)
        {
            Canvas containerCanvas = FixedDocumentCreator.CreateContainer(exportRectangle);
            Canvas elementCanvas   = null;
            var    border          = CreateBorder(exportRectangle);

            border.CornerRadius = new CornerRadius(Convert.ToDouble(exportRectangle.CornerRadius));

            CanvasHelper.SetPosition(border, new Point(0, 0));

            foreach (var element in exportRectangle.ExportedItems)
            {
                if (IsGraphicsContainer(element))
                {
                    elementCanvas = RenderGraphicsContainer(element);
                    containerCanvas.Children.Add(elementCanvas);
                }
                else
                {
                    AsAcceptor(element).Accept(this);
                    containerCanvas.Children.Add(UIElement);
                }
                containerCanvas.UpdateLayout();
            }

            border.Child = containerCanvas;
            UIElement    = border;
        }
        public override void Visit(ExportRectangle exportRectangle)
        {
            var pen = PdfHelper.CreateDashedPen(exportRectangle);

            xGraphics.DrawRectangle(pen,
                                    PdfHelper.CreateBrush(exportRectangle.BackColor),
                                    new XRect(containerLocation.ToXPoints(),
                                              exportRectangle.Size.ToXSize()));
        }
Beispiel #3
0
        public override void Visit(ExportRectangle exportRectangle)
        {
            var savedLocation = containerLocation;

            xGraphics.DrawRectangle(PdfHelper.CreatePen(exportRectangle),
                                    PdfHelper.CreateBrush(exportRectangle.BackColor),
                                    new XRect(containerLocation.ToXPoints(),
                                              exportRectangle.Size.ToXSize()));
            RenderContainerInternal(exportRectangle, savedLocation);
        }
Beispiel #4
0
        public override void Visit(ExportRectangle exportRectangle)
        {
            var border = CreateBorder(exportRectangle);

            border.CornerRadius = new CornerRadius(Convert.ToDouble(exportRectangle.CornerRadius));
            CanvasHelper.SetPosition(border, new Point(0, 0));
            var containerCanvas = CreateItemsInContainer(exportRectangle.ExportedItems);

            border.Child = containerCanvas;
            UIElement    = border;
        }
Beispiel #5
0
        public override void Visit(ExportRectangle exportRectangle)
        {
            var columnLocation = containerLocation;

            columnLocation.Offset(exportRectangle.Location);
            var pen = PdfHelper.PdfPen(exportRectangle);

            pen.DashStyle = PdfHelper.DashStyle(exportRectangle);
            gfx.DrawRectangle(pen, new XRect(columnLocation.ToXPoints(),
                                             exportRectangle.Size.ToXSize()));
        }
        public override IExportColumn CreateExportColumn()
        {
            var ex = new ExportRectangle();

            ex.Location     = Location;
            ex.ForeColor    = ForeColor;
            ex.BackColor    = BackColor;
            ex.Size         = Size;
            ex.DesiredSize  = Size;
            ex.Thickness    = Thickness;
            ex.DashStyle    = DashStyle;
            ex.StartLineCap = StartLineCap;
            ex.EndLineCap   = EndLineCap;
            return(ex);
        }
Beispiel #7
0
        public override void Visit(ExportRectangle exportRectangle)
        {
            var pen = FixedDocumentCreator.CreateWpfPen(exportRectangle);

            var visual = new DrawingVisual();

            using (var dc = visual.RenderOpen()){
                dc.DrawRectangle(FixedDocumentCreator.ConvertBrush(exportRectangle.BackColor),
                                 pen,
                                 new Rect(exportRectangle.Location.X, exportRectangle.Location.Y,
                                          exportRectangle.Size.Width, exportRectangle.Size.Height));
            }
            var dragingElement = new DrawingElement(visual);

            UIElement = dragingElement;
        }
Beispiel #8
0
 public virtual void Visit(ExportRectangle exportRectangle)
 {
 }