示例#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;
		}
示例#2
0
 public virtual void Visit(ExportRectangle exportRectangle)
 {
 }
示例#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;
		}
示例#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);
 }
示例#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;
		}
示例#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()));
		}
示例#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;
		}
示例#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()));
		}