通用Windows库(UWP)的方式,采取屏幕截图? [英] Universal Windows Library (UWP) Way to take screenshot?
问题描述
我想创建一个适用于通用的Windows要建一个ScreenCaptureLib.dll
I would like to create a ScreenCaptureLib.dll which is intended to be built for Universal Windows.
我们已经有以下使用Windows.Forms的:
https://github.com/ShareX/ShareX/tree/master/ShareX。 ScreenCaptureLib
We already have the following using Windows.Forms: https://github.com/ShareX/ShareX/tree/master/ShareX.ScreenCaptureLib
显然没有任何的Windows窗体的代码不工作,我想在上手正确的方向一些指点。
Obviously none of the Windows Forms code does not work and I would like some pointers in the right direction to get started.
我很感激你的帮助。
由于
迈克尔
推荐答案
您可以遵循的记录与抓屏屏幕,但请注意:
You may follow the official document for Record the screen with ScreenCapture, but please notice that:
的抓屏 API仅在移动设备上使用。
The ScreenCapture API is only available on mobile devices.
和现在没有API可直接用于从UWP应用捕获桌面上的屏幕。但是,作为一个变通办法,我们可以渲染XAML树为位图,要做到这一点,请参考的获取快照在Windows 8.1商店App 。
And for now there is no API can be used directly to capture the screen on a desktop from an UWP app. However, as a workaround method, we can render the XAML tree to a bitmap, to do this, please refer to Capturing Snapshot in Windows 8.1 Store App.
您也可以提交加入这一新功能通过Windows反馈工具开发的请求。
You may also submit a request to add this new feature for developing through the Windows Feedback tool.
更新:
的抓屏功能只支持运行的Windows Phone 8.1移动设备。不支持Windows 10这个API。
The ScreenCapture feature is only supported for mobile devices running Windows Phone 8.1. This API is not supported on Windows 10.
这篇关于通用Windows库(UWP)的方式,采取屏幕截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!