Problem in opening design page in xamarin

kefikefi Member ✭✭

when we click on the design page it says "Something went wrong, Connection is closed"

Answers

  • PatrickJelittoPatrickJelitto Member ✭✭✭

    can you please tell us a little bit more about what you are exactly doing? is this error showing on an emulator? on a device? in your code editor?

  • yelinzhyelinzh Member, Xamarin Team Xamurai
    edited April 19

    @kefi Check your VS settings.
    Follow the steps:
    Tools ->Options ->XAML designer


    Make sure 'Enable XAML Designer' selected.

  • kefikefi Member ✭✭

    @yelinzh said:
    @kefi Check your VS settings.
    Follow the steps:
    Tools ->Options ->XAML designer


    Make sure 'Enable XAML Designer' selected.

    it is already checked.

  • kefikefi Member ✭✭

    @Gelatto said:
    can you please tell us a little bit more about what you are exactly doing? is this error showing on an emulator? on a device? in your code editor?

    it is the error occur when we open design page in visual studio.

  • yelinzhyelinzh Member, Xamarin Team Xamurai

    Have you tried to Build->Clean solution ->Rebuild solution ?

  • kefikefi Member ✭✭

    @yelinzh said:
    Have you tried to Build->Clean solution ->Rebuild solution ?

    yes

  • yelinzhyelinzh Member, Xamarin Team Xamurai

    Try the follows.

    • Try closing and reopening the XAML file.
    • Ensure that your App class has a parameterless constructor.
    • Check your Xamarin.Forms version - it has to be at least Xamarin.Forms 3.6. You can update to the latest Xamarin.Forms version through NuGet.
    • Check your JDK installation - previewing Android requires at least JDK 8.
    • Try wrapping any initialized classes in the page's C# code behind in if (!DesignMode.IsDesignModeEnabled).
  • yelinzhyelinzh Member, Xamarin Team Xamurai

    Select 'Design View' as the image shows

  • kefikefi Member ✭✭

    @yelinzh said:
    Select 'Design View' as the image shows

    Problem is same

  • kefikefi Member ✭✭

    Geeting this error

  • yelinzhyelinzh Member, Xamarin Team Xamurai

    @kefi
    If you make your own custom controls, or use controls from a third-party library, the Previewer might display them incorrectly. For more details, you can refer to https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-previewer/render-custom-controls

Sign In or Register to comment.