Xamarin.Forms 4.0 Shell, Because 'The Last Thing You Want Is Hassle'
Xamarin.Forms 4.0 is out, a major release featuring the new Shell, an application container providing basic, common UI features -- including troublesome navigation functionality -- to help developers get started more easily and quickly.
Shell first appeared in a v4.0 preview last December and was explained in detail in an MSDN Magazine article by David Ortinau, who said it addressed frustration revealed in developer feedback about getting started with Xamarin.Forms. "The truth is that some developers find it frustrating at the outset," Ortinau said. "You chose Xamarin to be productive, and the last thing you want to encounter is unwanted hassle."
Much of that hassle resulted from wrangling with navigation functionality, one of the primary pain points that Shell addresses. "On the surface, Shell provides an extremely simple syntax to establish your app's flyout and tab menus," said Ortinau, senior program manager, Mobile Developer Tools, in an announcement post this week. "It also introduces a powerful route based URI navigation service in addition to the existing navigation service."
In addition to a common navigation UI and omnipresent navigation service with deep linking, Shell provides:
- A single place to describe the visual structure of applications
- An integrated search handler to improve the overall in-app search experience
- An extensible-by-default philosophy to add more versatility and flexibility
Even more, Shell's underpinnings provide the groundwork for wide-ranging future enhancements, due to its use of patterns based on "fast renderers," used in Android development to speed up the rendering of UI elements such as buttons, images and labels.
"The real power of Shell ... is underneath," Ortinau said. "All renderers implement the 'fast renderer' pattern, and everything is easily extensible by data templates and renderers. This new architecture introduces the foundation for future Xamarin.Forms development that will enable more expressive animations, transitions, and interactions."
Along with Shell and Android fast renderers graduating from preview, other Xamarin.Forms 4.0 highlights as detailed by Ortinau include:
- Image Source Unification: This takes FontImageSource -- introduced in v3.5.0 to facilitate easier use of font glyphs to decorate apps -- and extends it to icons and image sources for various controls. "From this point forward everything implements ImageSource," Ortinau said. "You can now use FontImageSource, embedded resources, files, and URIs everywhere without impedance."
- Accessibility: " We continue working towards improving the ease with which you can make your apps more accessible by now controlling the focus order directly in Xamarin.Forms. When you have a modal that goes away, or when you navigate from page to page, it's important to tell the device's screen reader which element has focus. Something should have focus. In order to now do this, you can set the TabIndex on any VisualElement and the native OS will take care of the rest."
Of course, there are tons of other new features and functionality packed into this major update, and developers wanting to delve deeper into details can watch a two-hour-plus launch event video published yesterday (May 22) or wade through the release notes.
David Ramel is an editor and writer for Converge360.