Search code examples
xamarinxamarin.formsrenderer

I can't turn on fast renderers on Xamarin forms


When I add Forms.SetFlags("FastRenderers_Experimental"); as https://developer.xamarin.com/releases/xamarin-forms/xamarin-forms-2.4/2.4.0-pre1/ states, I get the following error: 'Forms' does not contain a definition for 'SetFlags'. Indeed, I can't find one. So how is this meant to work? Is there another step?


Solution

  • You have to upgrade Xamarin.Forms to the pre-release version (2.4.0-pre1+) in each of your projects:

    <package id="Xamarin.Forms" version="2.4.0.266-pre1" targetFramework="monoandroid71" />
    

    enter image description here

    After that you can set the Forms.SetFlags:

    Xamarin.Forms.Forms.SetFlags("FastRenderers_Experimental");
    global::Xamarin.Forms.Forms.Init(this, bundle);