The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
Hololens Input in UWP 2d application
Is it possible to have a 2d application recognize a gesture outside the bounds of its window?
If I wanted to set up the program to take a specific action when there is a double click, could the program recognize the event of a double click if Im not facing the application window?
Best Answer
-
I'm going to try to take a guess on this. This is an interesting scenario. The 2D UWP application IS the rectangular bounded flat app. Where as a 3D Holographic app, is a 3D world space application. I would say no it can't recognize gestures outside the bounds of the window.
Due to the fact that once you click outside the bounds of the normal sized window you loose focus on the 2D UWP, which puts the app into suspended state, and if it stays there for more than 3-5 seconds then the app is unloaded (Typical Windows 10 behavior). This means your code isn't running thus you can't recognize a gesture.
A potential work around could be to create a 3D app, scan the room, and then switch to a 2D View and then recognize gestures, and raise double click events based on your gestures.
Another idea is to create a very large 2D window, and within the window highlight or make very visible a small rectangle which shows your ui and then recognize the click, and select commands.
Dwight Goins
CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
http://dgoins.wordpress.com5
Answers
I'm going to try to take a guess on this. This is an interesting scenario. The 2D UWP application IS the rectangular bounded flat app. Where as a 3D Holographic app, is a 3D world space application. I would say no it can't recognize gestures outside the bounds of the window.
Due to the fact that once you click outside the bounds of the normal sized window you loose focus on the 2D UWP, which puts the app into suspended state, and if it stays there for more than 3-5 seconds then the app is unloaded (Typical Windows 10 behavior). This means your code isn't running thus you can't recognize a gesture.
A potential work around could be to create a 3D app, scan the room, and then switch to a 2D View and then recognize gestures, and raise double click events based on your gestures.
Another idea is to create a very large 2D window, and within the window highlight or make very visible a small rectangle which shows your ui and then recognize the click, and select commands.
Dwight Goins
CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
http://dgoins.wordpress.com