Platform imperatives

Dealing with cross-platform mobile applications, developers need to create applications that will satisfy multiple design surfaces, as well as guidelines for multiple operating systems and idioms. Platform imperatives refer to the guidelines that developers and designers need to find a compromise between.

An idiom is how the form factor is defined in Xamarin.Forms applications. It can be used to create specific views for various phone form factors, as well as tablet, desktop, TV, and even for design surfaces for wearables such as Tizen watch.

When dealing with different idioms, target device capabilities, design surfaces, and input methods should be taken into consideration.

In order to make best use of the space available for web applications on desktop and mobile devices, developers often use responsive design techniques that can also be applied to Xamarin applications:

  • Fluid layout: In a fluid layout, items are stacked in a horizontal list and can take as many rows as required to list them, depending on the horizontal space available:
  • Orientation change: Items listed in a horizontal list on a device with a wider screen can be stacked vertically on devices with smaller screens with a greater height relative to the width.
  • Restructure: Elements' general layout can completely be restructured according to the available space. For instance, a view can use three segments in a horizontal setup in landscape mode, whereas for the portrait mode, two of these segments can be merged into one:
  • Resize: Rich media content elements, as well as text content, can be resized to make the best use of the design space available:

Additionally, as previously mentioned, device capabilities can play a big role in how an application should react to user input. For instance, the hardware back button is a nice example of this design consideration. If we were designing a mobile application that targeted the Android, iOS, and UWP platforms, we would need to remember that only Android offers a hardware or software back button. This capability, or lack of it on other platforms, makes it crucial to include a back navigation element on a second-tier application view. Similarly, if we were designing an application to be used on mobile devices (let's say, on iOS and Android), but at the same time the application should run on TVs with Tizen or Android operating systems, the input method and how the user navigates through the screens would become a crucial design factor.