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

Webview broken

$
0
0

I have a webview that is bound to an HTML snippet
snippet:
<h1>Hello World!</h1>

<WebView>
    <WebView.Source>
        <HtmlWebViewSource Html="{Binding Html}" />
    </WebView.Source>
</WebView>

private string _html;
public string Html
{
    get { return _html; }
    set
    {
        if (_html == value) return;
        _html = value;
        OnPropertyChanged();
    }
}

this used to work in previous versions of Forms, with the latest 2 stable releases it crashes

String reference not set to an instance of a String. Parameter name: s

stacktrace:

at System.Text.Encoding.GetBytes(String s)
   at Xamarin.Forms.Platform.WinPhone.WebViewRenderer.<SaveToIsoStore>d__a.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Xamarin.Forms.Platform.WinPhone.WebViewRenderer.<LoadHtml>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__3(Object state)

any ideas how to fix this?


Viewing all articles
Browse latest Browse all 75885

Trending Articles



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