News

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."

Shell App Featuring a Flyout for Top-Level Navigation
[Click on image for larger view.] Shell App Featuring a Flyout for Top-Level Navigation (source: Microsoft).

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.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube