Esempio n. 1
0
		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;
		}
Esempio n. 2
0
 public virtual void Visit(ExportRectangle exportRectangle)
 {
 }
Esempio n. 3
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;
		}
Esempio n. 4
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);
 }
Esempio n. 5
0
		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;
		}
Esempio n. 6
0
		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()));
		}
Esempio n. 7
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;
		}
Esempio n. 8
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()));
		}