简体   繁体   中英

Windows 10 IoT Raspberry Pi 2: Does .NET have mouse support as well?

I just managed to deploy my first Windows IoT Core (Background Application IoT) and Windows Universal (Blank App) via VS 2015 on RasPI2. After a quick scan I wonder if there is any mouse handling (MouseMove ...) integrated in the new .Net framework as well?

They're not in the .Net Framework: they're in the Windows Runtime.

Pointer events ( PointerPressed , PointerMoved , PointerReleased , etc.) are part of the Universal app contract and available on all Windows devices, including IoT.

Pointer events cover all pointer devices including mouse, touch, pen.

From what google was able to tell me, the answer is yes. You're app cannot be headless (so have UI and a screen, which makes sense). Here is the example I was able to find. It seems like movement is constrained to a Xaml UI object.

https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.uielement.pointerpressed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM