Xamarin Goes Dual Screen

David Ortinau

David

Surface Duo introduces a whole new class of ultra-portable experiences running on dual screens. Today we are excited to announce our public preview of the SDK for Surface Duo. Xamarin developers can take advantage of the new SDK to enlighten existing apps and create innovative experiences that inspires creativity.

Surface Duo Dual Screen Iphone and Ipad
 

Get Creative with Dual Screen

As you look at your current app screens and features, consider the following user experience patterns that might be best suited. By default, your app will run on the left or top screen depending on the orientation of the device. You then want to consider if your app should remain like that or if you could adopt one of these recommended patterns:

  • Extended Canvas
  • Master-Detail
  • Two Page
  • Dual View
  • Companion View

Recommended Patterns for Duel Screen Apps
The SDK for Surface Duo will help you avoid misaligning things behind the hinge. There are other things you will want to be mindful of when building for dual-screen experiences, and we’ve covered many of those for you here in our documentation.

 

Get Started

Ready to take the Duo for a spin and start creating powerful new app experiences? Download the SDK for Surface Duo and Android emulator today, and then hop over to our array of Xamarin samples on GitHub. The most useful APIs to use today are provided from the ScreenHelper class which will return a Boolean indicating if the device is a Duo.

You can also access other helpful features such as rotation, isDualMode, and hinge angle. Check the samples for more info.

Take advantage of this today in Xamarin.Forms with a custom layout. This works in any version of Xamarin.Forms, no updates needed. For this initial launch we’ve created a custom layout dubbed the TwoPaneView that manages both screens, positions content, avoids the hinge area, and reacts to rotation. You can set the behavior of your layout with a simple enum:

The following custom layout takes two children, one for each pane (or screen). This example shows the companion pane pattern using a TwoPaneView  custom layout.

Dual Screen Sample gif
We have a sample showing an array of different layouts supporting all of the pattern guidance mention in our documentation. Start exploring here.

 

Get Dreaming About Dual Screen

Surface Duo is the first in this whole new class of devices and app experiences. When Surface Neo is available running Windows 10X, we’ll share continued support for that experience with first-class support in Xamarin.Forms. The amazing news is that all the work you see here to support dual-screen experiences for the Surface Duo are 100% cross-platform and required no changes to Xamarin.Forms itself.

What do you dream of doing with these new devices? What interesting types of UI does this inspire you to build?

We’d love to hear from you! Help guide our investment in supporting your vision and schedule a call with us to discuss.

Additional Resources:

 

Bonus: Live Stream Today!

Today at 12:30 PST we will be live streaming on Twitch with David Ortinau, Jonathan Dick, and Shane Neuville walking you through setting up the SDK and exploring the samples. Join us on Twitch!

David Ortinau
David Ortinau

Principal Program Manager, Mobile Developer Tools

Follow David   

8 comments

Leave a comment