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 for Converge360.

comments powered by Disqus

Featured

  • Move Over, Stack Overflow: Microsoft Launches Q&A for .NET

    Stack Overflow probably isn't worried, but Microsoft has launched its own Q&A site for all things .NET, seeking to provide a one-stop-shop for getting .NET technical questions answered by the community.

  • Developer Decries WinForms-to-Blazor Performance Degradation

    Since shipping .NET 5, Visual Studio 2019 v16.8 and more goodies recently, Microsoft has been touting speed improvements in many components -- including the red-hot Blazor project -- but some real-world developers are finding different results.

  • Google Cloud Functions Supports .NET Core 3.1 (but not .NET 5)

    Google Cloud Functions -- often used for serverless, event-driven projects -- now supports .NET, but the new support is a release behind Microsoft's latest .NET offering.

  • Binary Classification Using PyTorch: Model Accuracy

    In the final article of a four-part series on binary classification using PyTorch, Dr. James McCaffrey of Microsoft Research shows how to evaluate the accuracy of a trained model, save a model to file, and use a model to make predictions.

  • Visual Basic in .NET 5: Ready for WinForms Apps

    With the milestone .NET 5 and Visual Studio 2019 v16.8 releases now out, Microsoft is reminding Visual Basic coders that their favorite programming language enjoys full support and the troublesome Windows Forms Designer is even complete -- almost.

Upcoming Events