是否有任何开源可用于此?
或其他任何方法来实现这一目标?
或者是否可以将数据导出为HTML格式?
答案 0 :(得分:0)
下面的代码可以让您获得FrameworkElement(您的窗口)的图像: 您可以使用图像并打印图像: (我不确定图像会是什么样子,因为你有超过500条记录)
Transform transform = element.LayoutTransform; element.LayoutTransform = null;
double width = element.ActualWidth;
double height = element.ActualHeight;
// fix margin offset as well
Thickness margin = element.Margin;
element.Margin = new Thickness(0, 0, margin.Right - margin.Left, margin.Bottom - margin.Top);
// Get the size of canvas
Size size = new Size(width, height);
// force control to Update
element.Measure(size);
element.Arrange(new Rect(size));
RenderTargetBitmap bmp = new RenderTargetBitmap((int)width, (int)height, 96, 96, PixelFormats.Pbgra32);
bmp.Render(element);
// return values as they were before
element.LayoutTransform = transform;
element.Margin = margin;
Clipboard.SetImage(bmpCopied);