Skip to main content

Hot Reload: Now Available in Xamarin.Forms

·3 mins

A feature that is highly anticipated, has now been launched: XAML Hot Reload for Xamarin.Forms. If you have seen the keynote at the Xamarin Developer Summit you have already seen this in action.The keynote also included a whole lot of more awesome stuff! But in this post, I will show you a bit more on what Hot Reload is. I will even tell you how to get started yourself.

What is Hot Reload? #

I think we all know this, but for the ones who don’t, let me reiterate it one more time. If you are a Forms developer you know the pain to have to rebuild and restart debugging for every minor visual change. There have been some attempts to overcome this. There has been the XAML previewer and Xamarin Live Player for instance. But they were all different of what Hot Reload does.

XAML Hot Reload for Xamarin.Forms is meant to speed up your UI development. Each time you make a change in your XAML, you just hit save and boom! Your changes are already on-screen. It doesn’t matter if that is an emulator or physical device. That is why Hot Reload makes it so much easier to build, experiment, and iterate on your UI.

With this new solution, you no longer have to rebuild your app every time you want to change something minor in your visuals and wait for 10 seconds, only to discover the change is still not what you wanted.

Sneak Preview #

Let me give you a little insight in what is in store for you. In the clip below you can see my IDE on Mac. Don’t worry it also works on Windows and of course for iOS and Android. Visual Studio for Mac has the Hot Reload extension installed and the latest Xamarin.Forms 4.1 packages installed. That is all you need. No further setup.

In the IDE I just create a File > New Xamarin.Forms project, I run it and I start editing**.** I’m saving each change as I go. You can see that I change a number of things: a color here, adding an extra control there or adding and removing text. It all shows up instantly. Pretty cool, right?!

https://youtu.be/ygi-fOR5KuQ

It works with all your resources, frameworks, Shell and third-party plugins that you have today.

Sign up for the Private Preview, today! #

As of right now, you can sign up for a private preview. You can find all the information on that here: https://devblogs.microsoft.com/xamarin/xaml-hot-reload/.

We’re letting people try this out in batches, so don’t be disappointed when you cannot get it immediately. And as always; we very much appreciate your feedback. There are some known challenges and things are still in progress, but we want your input on what is important and what might be missing. That is what this preview is for :)

I am sure that Hot Reload will make your Xamarin development life a whole lot better. I can’t wait to hear what you think. If there is anything I can help you with (except moving you up the private preview list) please let me know!

Happy reloading!

Baby shark du-du-dududu…