Reputation: 19
I want to read my bluetooth le heart rate sensor output programmatically.
How do I take a screenshot from an UWP?
Upvotes: 0
Views: 1230
Reputation: 141
To your first point, most of the Bluetooth APIs are marked with the DualApiPartionAttribute - that means they can be called from UWP or a regular Win32/Winforms/WPF/.NET application. Visual Studio doesn't make this easy to reference for you yet. You need to first add the reference to the union Windows.WinMD for the version of windows you want to target, ie:
and since many of apis are Async() you'll need to reference:
Then the sample code looks essentially the same as UWP but called from your .NET app:
To your other questions about Screen capture, starting in Windows 1803, windows added a new Graphics Capture capability and apis. These classes are also marked DualApiPartitionAttribute so you can call them from either UWP or your Win32/.NET application. You can find more about them here:
Hope this helps,
-Adam
Upvotes: 2