Page 44 - MSDN Magazine, September 2018
P. 44
XAMARIN.FORMS
Xamarin Productivity and
Platform Improvements
for Visual Studio 2017
Alessandro Del Sole
Mobile app development with Xamarin and Visual Studio, both on Windows and on the Mac, is crucial for Microsoft, which has made large investments to improve the quality and power of its mobile development tools and platforms. At the Build 2018 con- ference in May Microsoft unveiled a new generation of tools for cross-platform app development with C#, with a focus on produc- tivity and performance. These include updates in the Xamarin tools for Visual Studio 2017, new features and improvements in Visual Studio for Mac, and the release of Xamarin.Forms 3.0.
In this article, I describe what’s new for mobile app developers working with C# and Xamarin in Visual Studio 2017, walking through the features and updates that solve issues that existed in previous versions. You need Visual Studio 2017 version 15.7.3 or newer to use the new features, but I recommend that you install the latest available version (15.7.4 at this writing). I’ll start with pro- ductivity updates and additions to Visual Studio 2017, and then I’ll describe what’s new in the platform support for iOS and Android.
Visual Studio 2017 Tools for Xamarin
The Visual Studio 2017 IDE has recently been improved with new and updated tools for Xamarin, including XAML editor updates, integrated tools for iOS and Android updates, enhanced platform support, and new versions of Xamarin.Forms. These improvements are extremely important and deserve a thorough discussion, so the first part of this article walks through features that are related to both the coding experience and the integrated platform support.
XAML Editor Updates Developers working with Xamarin.Forms will benefit from the new XAML code editor, which is now powered by the same engine that drives Windows Presentation Foundation (WFP) and Universal Windows Platform (UWP). This is extremely important for several reasons:
• Full, rich IntelliSense support: Earlier versions of Intelli- Sense could make writing XAML markup painful to do. The new version adds linting, fuzzy matching and substring matching, which I’ll describe in more detail.
• Enhanced support to binding expressions: IntelliSense now lists available objects for bindings based on the {Binding} markup extension and also lists available resources when using the {StaticResource} markup extension.
• Quick actions and refactorings: Light bulb suggestions are now available to XAML in Xamarin.Forms, just as they havebeenforWPFandUWP,makingiteasytoresolveXML namespaces, remove unused namespaces, and organize code with contextualized suggestions.
The feature known as fuzzy matching provides an algorithm that helps you find appropriate completions based on what you typed. For example, if you type Stk and then press Tab, IntelliSense will
This article discusses:
• XAML editor updates in Visual Studio 2017 that improve IntelliSense with powerful shortcuts, hints and other features
• Better platform support for iOS and Android in the latest version of Xamarin
• New features in Xamarin.Forms 3.0 and 3.1, including FlexLayout and the Visual State Manager
Technologies discussed:
Xamarin.Forms, Visual Studio 2017, iOS, Android
36 msdn magazine