捕获WPF窗口的屏幕截图的源示例

捕获WPF窗口的屏幕截图的源示例

本文介绍了捕获WPF窗口的屏幕截图的源示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,我正在使用White API来控制WPF应用程序,但是White API没有功能来为其生成UI事件的当前窗口生成位图图像.因此,我正在寻找一些示例代码,可以在其中捕获在单独的进程(正在测试的应用程序)中运行的外部WPF窗口的快照,并传入UIAutomationClient.AutomationElement.到目前为止,我仅设法找到了GDI屏幕捕获应用程序的屏幕捕获源示例,在这些示例中,它们无法捕获正在运行的WPF应用程序的图像.任何关于在哪里看的建议都将不胜感激.

Currently I am using the White API to control a WPF application, but the White API has no functionality to generate a bitmap image of the current window for which it is generating UI events for. So, I am looking for some example code where I can take a snapshot of an external WPF window running in a separate process (application under test) passing in an UIAutomationClient.AutomationElement. So far, I have only managed to find screen capture source examples for GDI screen capture applications where they will not capture the image of a running WPF application. Any suggestions on where to look is greatly appreciated.

推荐答案


这篇关于捕获WPF窗口的屏幕截图的源示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 14:31