I've added UWP project to my Xamarin.Forms solution. There is a link on the top of the page that says: Hot Reload Available
but nothing happens when I change the XAML code!. as far as I've checked, for this feature, I should not add any extra libraries of extensions. how can I turn-on this feature?
EDIT: The documentation I referenced below now states that hot reload is now implemented for Xamarin Forms UWP apps in addition to iOS and Android. Yay!
—
I'm adding this answer in the hope that it saves someone else some time wondering why it isn't working for them.
The short answer to the question originally asked is that, right now
Hot Reload is NOT available for Xamarin Forms UWP projects.
despite that misleading "Hot Reload available" message at the top of the window in the emulator.
It DOES work for Xamarin Forms iOS and Android projects, and it works for non-Xamarin UWP projects.
This is documented, a few paragraphs down:
http://learn.microsoft.com/en-us/xamarin/xamarin-forms/xaml/hot-reload
I suggest you upvote this suggestion if you want it to receive more attention:
https://developercommunity.visualstudio.com/content/idea/661682/xaml-hot-reload-for-xamarinforms-on-uwp.html
No additional installation or setup is required to use XAML Hot Reload. It's built into Visual Studio and can be enabled in the IDE settings. Once enabled, you can start using XAML Hot Reload by debugging your app on an emulator, simulator, or physical device.
On Windows, XAML Hot Reload can be enabled by checking the Enable Xamarin Hot Reload checkbox at Tools > Options > Xamarin > Hot Reload.
For more information, please visit the documentation.
Best regards.
First of all Hot Reload is still in preview as of Aug 15, 19' and is being tested by the community and has a bunch of known bugs and issues.
Below are the minimum requirements for you to be able to use hot reload
Visual Studio 2019 16.3 or greater
Visual Studio 2019 for Mac 8.3 or greater
Xamarin.Forms 4.1 or greater
Now you can enable hot reload by:
On Windows, XAML Hot Reload can be enabled by checking the Enable Xamarin Hot Reload checkbox at Tools > Options > Xamarin > Hot Reload.
On a Mac, XAML Hot Reload can be enabled by checking the Enable Xamarin Hot Reload checkbox at Visual Studio > Preferences > Projects > Xamarin Hot Reload.
Limitations (Known)
You can't add, remove, or rename files or NuGet packages during a XAML Hot Reload session.
If you add or remove a file or NuGet package, rebuild and redeploy your app to continue using XAML Hot Reload.
Set the linker to Link None for the best experience. The Link SDK only setting works most of the time, but it may fail in certain cases.
Debugging on a physical iPhone requires the interpreter to use XAML Hot Reload. Add --interpreter to the Additional mtouch arguments field in your iOS Build settings to use XAML Hot Reload.
Any references created by assigning a control to another field or property using its x:Name value won't be reloaded.
Updating the visual hierarchy of your Shell application in AppShell.xaml can cause issues maintaining the state of your application. Rebuild the app to continue reloading.
XAML Hot Reload can't reload C# code, including event handlers, custom controls, page code-behind, and additional classes.
For future references, you can check the official document of Hot Reload
Hotreload for UWP project was released with stable 16.8 Update.
Make sure you have enabled UWP
and set the mode to "Changes only" under Tools -> Options -> Debugging -> Hot Reload
Xamarin.Forms “changes only” XAML Hot Reload now supports UWP: in this
release we begin to rollout support for a highly requested feature
that enables the new changes only XAML Hot Reload support in
Xamarin.Forms Projects when targeting UWP. Please note this feature is
still in development, and while editing XAML will now trigger updates
in the running app other features such as in-app toolbar (element
selection, etc.) are not yet fully implemented, but will be in a
future release.
XAML Hot Reload only works when debugging on iOS or Android.
Check Documentation :
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/xaml/hot-reload
Related
I can not for the life of me get XAML hot reloading working on Visual Studio (Mac).
Link behavior is set to "Don't Link"
XAML hot reload is enabled in Visual Studio Settings
Visual Studio and all Nuget packages are up to date.
This first started occurring in my app, so to test, I started with the Xamarin sample app and that won't reload either.
Here is the output from the XAMAL Hot reload window:
[12:49:40 PM] XAML Hot Reload is using 'changes only' mode
[12:49:51 PM] Xaml Changed for 'Views/AboutPage.xaml' in 'hotreloadtest', sending to app...
This is a bug for IOS15.
You can learn more about it at this link(https://developercommunity.visualstudio.com/t/XAML-Hot-Reload-does-not-load-with-Xamar/1543082).
It will be fixed soon.
I just re-installed windows, got visual studio back on it, cloned it from my github repo. And all of a sudden I can't see my preview design screen anymore. Tried a bunch of things already.
I got the lates jdk,
got the latest xamarin nuget packages.
Restarted VS,
rebuild/ clean solution
Got into my tools > options > xamarin, did see the option for splitview, but no matter what. it didnt bring it. I can't even see the 3 buttons for preview, split vertical and split horizontal.
Screenshot of visual studio window where the buttons are missing
if anyone knows the solutions i would be very happy to know, makes the desigining way easier instead of always building the project to see the change, even with hot reload on
After set the settings in Tools > Options > Xamarin > Xamarin.Forms XAML Previewer dialog, you need to restart the Visual Studio.
If it still does not work when you create a new project, you could right click the content page, select the View Designer. It was able to open the previewer.
Updated:
The XAML Previewer has been deprecated in Visual Studio 2019 version 16.8 and Visual Studio for Mac version 8.8, and replaced by the XAML Hot Reload feature in Visual Studio 2019 version 16.9 and Visual Studio for Mac version 8.9.
For now, I use the Hot Reload insead and provide a live visual tree to receive a real-time view of your running XAML code. It shows a tree view of the UI elements of your running Xamarin.Forms application.
When you debug you project, by default, it appears on the IDE's left. If you don't see it, use Debug > Windows > Live Visual Tree to show it.
you can choice Tools > Options > XAML Designer > General > Default document view > Split View in Visual Studio 19.9 or later.
Cross platform Missing Templates after updating Visual studio 2017,i tried looking for a solution from Xamarin forums page in vain.
Yes, some templates no longer exist in VS2017, but others it's just organized a bit differently in how you get to the specific template you want.
Example:
The Blank App and Blank XAML App templates no longer exist in VS2017. Instead, choose the "Cross Platform App (Xamarin.Forms or Native)" template. A wizard pops will appear allowing you to choose a native Xamarin app or a Xamarin Forms app, as well as choosing a Shared or PCL app, as well as selecting a XAML app.
I just wanted to know that, is it possible to get the designer view in Xamarin.Forms with Visual Studio 2015. It's very hard to compile code every time to check the simple changes.
Thank You in advance.
If you are using XAML to write the code you can use XAML Previewer for Xamarin.Forms You can see the documentation here:
https://developer.xamarin.com/guides/xamarin-forms/xaml/xaml-previewer/
Few things to keep in mind:
You need to be connected to MAC Agent to make it work (I am not sure
why this is the case even for Android, For me it does not work without connecting to mac agent)
The Previewer works on any ContentPage, ContentView, or ViewCell in
a Xamarin.Forms application
To launch the Previewer in Visual Studio, select View -> Other
Windows -> Xamarin.Forms Previewer
Latest-and-greatest Xamarin.Forms NuGet is recommended; at least
2.3.2 is required
Project should be built (compiled) before attempting to preview XAML
files.
This is a "Preview" release, so it may not always work as expected.
I recently downloaded Xamarin.Forms as Microsoft made it free. I am looking around in Visual Studio for a visual designer, that is usually included in Xamarin.Droid and Xamarin.IOS. Is there no such feature for Xamarin.Forms? Surely I must be missing something ?
Xamarin does not have a designer for Xamarin.Forms at this time, but is working on the Xamarin.Forms Previewer which renders a live preview of a Xamarin.Forms page side-by-side with the XAML markup directly inside the Visual Studio and Xamarin Studio IDEs.
You can open the Xamarin.Forms Previewer by clicking on View -> Other Windows -> Xamarin.Forms Previewer in the Visual Studio menu or alternatively just searching for Xamarin.Forms in the Visual Studio quicklaunch box.
In addition to the official Xamarin.Forms Previewer, there is at least one other third party tool that exists in this space as well:
Gorilla Player by UX Divers is a real time Xamarin.Forms previewer currently in beta that runs in both a simulator and on hardware devices.
Update (2018): There is now also the Xamarin Live Player for Xamarin.Forms that allows you visualize your XAML layouts running live on a physical device as you are developing them.
No, Xamarin Forms does not have a drag and drop design surface. There is a live XAML previewer, but it is still in alpha release.
A Xamarin previewer (while not a designer, it is still VERY handy) is available in the latest version of Visual Studio. To access it go to
View > Other Windows > Xamarin.Forms Previewer.
When you open a XAML page, you can see it in the previewer (make sure your project is built first or you will get an error.)
The preview will update automagically as you edit your XAML, no save is required. When working with lists etc, you will want to create some dummy data to ensure you can see how it will work. There is an example at https://xamarinhelp.com/xamarin-forms-previewer/
There are options to view your Xamarin
Xamarin Form Previewer - you view it on visual studio
Xamarin Live Player - you can view it on the target devices
Gorilla Player - you can view it on target devices with real-time update
However all comes with limitation, if you're using third party controls than it may not be supported.
You can find a "Design" named button under your source code. Click on it and you will be able to use drag and drop from the tool box on the left.