Xamarin.Forms 101: XAML Previewer

Sign in to queue

Description

Let's take a step back in a new mini-series that I like to call Xamarin.Forms 101. In each episode we will walk through a basic building block of Xamarin.Forms to help you build awesome cross-platform iOS, Android, and Windows applications in .NET. This week we will look at how to visualize your application with the built in XAML Previewer for iOS and Android.

Show Notes:

Embed

Download

The Discussion

  • User profile image
    Alan

    On the Latest VS2019 Windows (Xamarin Forms Android) , I still can't use the Previewer. The previewer is stuck at "Loading Xamarin.Forms Previewer".

  • User profile image
    Cklauber
    The previewer is awesome when it works. I always have issues loading it when my application start to grow too big. Another issue I have is with custom controls. Every time I get a nuget package with custom controls it does not display it.
    Now, for simpler UIs, the previewer works great.
  • User profile image
    mdybala

    Don't get me wrong but...how often in "real life" application you deal only with embedded X.F controls? The answer is - very rarely. Hence, it makes VS previewer completely useless if you have more sophisticated code and a lot of custom controls. Good intentions but poorly executed. Pity...

  • User profile image
    maddyleger1
    @Alan:

    Hi Alan! We are investigating that issue and hopefully will have a fix for it in the next VS release. Thanks!
  • User profile image
    maddyleger1
    @Cklauber:

    Hi Cklauber! We hear you on this, we have put some work into turning off custom controls if the previewer can't render them and just rendering everything around them so it doesn't crash. We have some docs on working with custom controls here: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-previewer/render-custom-controls
  • User profile image
    maddyleger1
    @mdybala:

    Hi there! Yup, the Previewer has a hard time with some custom controls, so we have set it up to no longer error if it can't render them - it just won't show anything for that control and renders around it. You can read more about custom controls in the previewer here: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-previewer/render-custom-controls

Add Your 2 Cents