Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2490
Xamarin.Form preview
posted

Hi, 

If I use AppMap for create project, I can't use Xamarin.Forms previewer.

It gives an error "Default constructor not found for type...

Do you have same error ?

if I remove the class on my .xaml file it's ok.

x:Class="AppMapProject2.Views.Login"
Title="Login">

If I create projet Cross Platform App (Xamarin,Forms) with UI technology : Xamarin.Forms and Code sharing strategy : PCL I can use previewer.

Francois.

  • 2490
    Verified Answer
    posted

    Hi, 

    I Think I have found,

    I chage prism:ViewModelLocator.AutowireViewModel="True" to false

    and now I have no more error with Xamarin.Forms Previewer.

    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
    prism:ViewModelLocator.AutowireViewModel="True"
    xmlns:local="clr-namespace:AppMapProject2.Views;assembly=AppMapProject2"
    x:Class="AppMapProject2.Views.Login"
    Title="Login">

    Francois.

  • 715
    Verified Answer
    Offline posted

    Francois,

    Currently, the Infragistics Controls do not render in the Xamarin Forms Previewer.  It is a known limitation of the previewer as the previewer does not support Skia Sharp rendering.

    You should leave the prism:ViewModelLocator.AutowireViewModel="True" as setting this to false will impact runtime performance.

    Thank you for bringing up the issue of no default constructor.  I will address this with the Prism team.