UWP WebView Intermittently Fails to Load in a Xamarin.Forms App - Resolved!
As I've previously mentioned I've been porting an existing Xamarin.Forms app over to UWP and tonight I've had to tackle an annoying bug which was quite difficult to overcome and I thought worthwhile sharing. The bug occurs when loading WebViews with HTML directly rather than a URL. I found that roughly 1 in 5 page loads ended up a blank page being rendered. As this is now the third platform for the App I was fairly confident the html and everything was correct. First of all I suspected a layout issue and maybe the width/height was being messed up so I added a background colour to the control but this always rendered. So not a layout issue. A quick Google led me to Johan Karlsson's post on events needing to be added on the main UI Thread this seemed better at first but i ended up still hitting the issue 1 in 10 page loads. More googling led me to a Xamarin bug with the issue but no resolution :( Taylor Buchanan comments on the bug with a work around howeve...