Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

WebView in Xaml using data binding

$
0
0

Hi!

I have a very simple Xaml-page containing only one element.

 <WebView Source="{Binding TermsAndConditions}" />

That binds to a view model where TermsAndConditions is a string.

The life cycle is like this

  1. Load the page and set the BindingContext to a VM where TermsAndConditions is an empty string
  2. Update the ViewModels TermsAndConditions to a string

At the moment I cannot set the TermsAndConditions any sooner that this due to DI. This all works fine on iOS and Android, but on Windows Phone it crashes with an error message saying that the URI cannot be empty.

What I'm doing to fix this is to set the TermsAndConditions to about:blank for Windows Phone.

So my question is, why does WP even try to load with an empty URI to begin with, could it default to about:blank or something? Am I doing it wrong?

Thanks

Johan


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>