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

  • Random Neighborhoods Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the random neighborhoods regression technique, where the goal is to predict a single numeric value. Compared to other ML regression techniques, advantages are that it can handle both large and small datasets, and the results are highly interpretable.

  • As Some Orgs Restrict DeepSeek AI Usage, Microsoft Offers Models and Dev Guidance

    While some organizations are restricting employee usage of the new open source DeepSeek AI from a Chinese company due to data collection concerns, Microsoft has taken a different approach.

  • Useful New-ish Features in .NET/C#

    We often hear about the big new features in .NET or C#, but what about all of those lesser known, but useful new features? How exactly do you use constructs like collection indices and ranges, date features, and pattern matching?

  • TypeScript 5.8 Beta Speeds Program Loads, Updates

    "TypeScript 5.8 introduces a number of optimizations that can both improve the time to build up a program, and also to update a program based on a file change in either --watch mode or editor scenarios."

  • AI Toolkit for VS Code Now Lets You 'Bring Your Own Model'

    "AI Toolkit extension for VS code now supports external local models via Ollama. It has also added support remote hosted models using API keys for OpenAI, Google and Anthropic."

Subscribe on YouTube