wpf简单的截图代码 图片截取和保存 private BitmapSource CreateElementScreenshot(Visual visual, int width, int height) { RenderTargetBitmap bmp = new RenderTargetBitmap(width, he