Uno Platform for Surface Duo and Surface Neo
Surface Duo is an Android device, and Surface Neo is a Windows 10X device. This is the cross-platform scenario Uno Platform has been solving for a long time and when SDKs and emulators were released, Uno Platform apps automatically worked on Surface emulators.
How It Works
The Uno Platform philosophy is to replicate the WinUI and Windows APIs everywhere. Uno Platform support for Surface devices is based on WinUI TwoPaneView control, which is a Windows 10 specific control providing ability to layout content in two panes, but it also reacts and layout your content well on dual screen devices. It behaves like a dual ContentControl, based on a set of parameters such as Pane length, tall and wide configuration modes and pane priorities to display content based on the available window space. It can be useful when dealing with orientation changes, in windowed modes, or snap/split screen scenarios.
Hinge angle sensor for Uno Platform dual-screen apps
A unique feature and key developer consideration when developing for Surface Neo and Duo devices is the hinge angle sensor. When combined with the TwoPaneView you can write your C# applications only once and using Uno Platform you can run them on both devices with zero code changed.
- Ensure you have SDKs from Microsoft – Download Surface Duo SDK Preview and Use the Surface Duo emulator(useful hints to make emulator work)
- Run through Uno Platform Getting Started tutorial. This will ensure you have the correct environment set up and that you have the latest release of Uno.
- Try Hello World sample app on GitHub
To showcase the cross-platform API, see this sample app on GitHub by one of our community contributors – Martin Zikmund.
Uno community member Ian Bebbington has put together an app called COduo to help users in the UK understand the environmental impact of their energy usage