How can we fix web view blink issue?
XAML code
util:WebViewCustomProperties.HtmlContent="{Binding CourseDescription}"
WebViewCustomProperties Class
// "HtmlContent" attached property for a WebView
public static readonly DependencyProperty HtmlContentProperty =
DependencyProperty.RegisterAttached("HtmlContent", typeof(string), typeof(WebViewCustomProperties), new PropertyMetadata("", OnHtmlHtmlContentChanged));
// Getter and Setter
public static string GetHtmlContent(DependencyObject obj) { return (string)obj.GetValue(HtmlContentProperty); }
public static void SetHtmlContent(DependencyObject obj, string value) { obj.SetValue(HtmlContentProperty, value); }
// Handler for property changes in the DataContext : set the WebView
private static void OnHtmlHtmlContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
WebView wv = d as WebView;
if (wv != null)
{
wv.NavigateToString((string)e.NewValue);
}
}
Issue Video