Universal Windows Library (UWP) Way to take screenshot?

六月ゝ 毕业季﹏ 提交于 2020-01-03 02:25:13

问题


I would like to create a ScreenCaptureLib.dll which is intended to be built for Universal Windows.

We already have the following using Windows.Forms: https://github.com/ShareX/ShareX/tree/master/ShareX.ScreenCaptureLib

Obviously none of the Windows Forms code does not work and I would like some pointers in the right direction to get started.


回答1:


You may follow the official document for Record the screen with ScreenCapture, but please notice that:

The ScreenCapture API is only available on mobile devices.

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.

You may also submit a request to add this new feature for developing through the Windows Feedback tool.

Update:

The ScreenCapture feature is only supported for mobile devices running Windows Phone 8.1. This API is not supported on Windows 10.



来源:https://stackoverflow.com/questions/35589563/universal-windows-library-uwp-way-to-take-screenshot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!