Reputation: 435
I'm not be able to see my design screen in the xamarin froms previewer. It is only showing a MockView
with a orange screen with black text after rendering.
I don't get any errors about it?
Upvotes: 11
Views: 7283
Reputation: 1
Update Visual Studio.
I had the same problem and I have updated the Visual Studio and it helped me. The problem was solved.
Found this at developercommunity.visualstudio.com:
a fix for this issue has been released. Install the most recent release from https://visualstudio.microsoft.com/downloads
Upvotes: -1
Reputation: 23
Move your viewmodel binding from the xaml file to the code behind of the XAML file. This should help get back the layout in previewer.
Upvotes: 2
Reputation: 527
2020 Answer:
Answering as this keeps coming up in 2020 when searching for "xamarin android mock view"
It was a bug introduced in Xamarin Forms, see an ongoing issue here:
https://github.com/xamarin/Xamarin.Forms/issues/10224
This was possibly (not confirmed) introduced in android X project update.
Upvotes: 1
Reputation: 1
I resolved the same issue by using older version of EF v2.2.6, and it works just fine!
Upvotes: 0
Reputation: 4336
Clean the Solution and Build it. This helped me.
If it does not work, Restart Visual Studio and then Clean -> Build Solution.
For Clean-Build Solution on Menubar Go to Build -> Clean Solution. After that Go to Build -> Build Solution.
Remember that doing Clean-Build only to your specific Android, iOS or UWP project might not work. You need to clean and build the entire solution that contains Android, iOS and UWP projects.
Upvotes: 1
Reputation: 71
I solved this issue by using the Debug mode instead of Release
Upvotes: 7
Reputation: 1
Just set "Theme" -> Default Screen: 1 I was really happy when it worked. Maybe there are a lot of reasons of this problem. But this is one of them.
Upvotes: -1
Reputation: 89
i had the same problem,the mockview screem just close the previewer also close any XAML page open and open the previewer again,it will fix it
Upvotes: 6