News

New Xamarin Tools in Visual Studio 2017 RC

Two new tools for cross-platform developers provide insight into app performance and allow for real-time XAML previews.

Developers who are familiar with the Xamarin integration that's going on with Visual Studio should be aware of two new features that are available: Xamarin Forms Previewer and Xamarin Profiler. These tools are part of Visual Studio 2015 and 2017 RC that was made available a few weeks ago as part of Microsoft's Connect(); event.

The Previewer is a component of Xamarin.Forms that allows for "a live preview of a page side-by-side with the XAML markup, allowing you to see your user interface come to life as you type," writes Nina Vyedin, a Xamarin program manager, in a blog post. Just clicking on any ContentPage, ContentView, or ViewCell file while in Xamarin Studio or Visual Studio for Mac will bring up a project in a split window showing code and the rendered page side by side in a dual pane editing window. Developers can toggle between design surfaces, from iOS to Android, and from a tablet to smartphone, as well as viewing rendered pages in landscape or portrait mode. Rendered pages are also zoom-able.

It's available for free to Visual Studio developers working under a Community license, and it's installed by default with VS 2017 RC and updated installs of VS 2015.

The other tool, Xamarin Profiler, is intended as a spit polish for apps, to identify any performance issues before developers put apps into production. "The Xamarin Profiler is currently the only way to profile managed (C#) code and find memory and performance issues in Xamarin applications," Vyedin writes, in a separate post. "It can also be paired with native profilers, like Xcode Instruments and Android Monitor, to ensure better app behavior and performance."

Xamarin Profiler carries out its work using three instruments:

  • Allocations: Lists each object, its memory usage, and what each object is used for. Each object's data can be filtered for specific objects or allocations, and app allocations can be snapshotted to record specific activity based on time.
  • Time Profiler: Within the Allocations instrument, a developer can click on an object to get a sampling of that object's activity.
  • Cycles: Shows a list of cycles under the Roots & Cycles tab, and is used for identifying native reference cycles for objects using a table and visual chart. "These types of cycles are important, because they prevent the objects involved from being picked up by the garbage collector," writes Vyedin.

Xamarin Profiler can be used for Windows and Mac apps. See Vyedin's post for more.

About the Author

Michael Domingo is a long-time software publishing veteran, having started up and managed several developer publications for the Clipper compiler, Microsoft Access, and Visual Basic. He's also managed IT pubs for 1105 Media, including Microsoft Certified Professional Magazine and Virtualization Review before landing his current gig as Visual Studio Magazine Editor in Chief. Besides his publishing life, he's a professional photographer, whose work can be found by Googling domingophoto.

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