Exemplo n.º 1
0
        public static void HtmlPropertyChanged(BindableObject bindableObject, object oldValue, object newValue)
        {
            WebBrowserPage webBrowserPage = (WebBrowserPage)bindableObject;
            string         newHtml        = (string)newValue;

            if (newHtml != null)
            {
                webBrowserPage.webView.Source = new HtmlWebViewSource()
                {
                    Html = newHtml
                }
            }
            ;
        }
Exemplo n.º 2
0
        public static void UrlPropertyChanged(BindableObject bindableObject, object oldValue, object newValue)
        {
            WebBrowserPage webBrowserPage = (WebBrowserPage)bindableObject;
            string         newUrl         = (string)newValue;

            if (newUrl != null && (webBrowserPage.webView.Source == null || (webBrowserPage.webView.Source is UrlWebViewSource) && ((UrlWebViewSource)webBrowserPage.webView.Source).Url != newUrl))
            {
                webBrowserPage.webView.Source = new UrlWebViewSource()
                {
                    Url = newUrl
                }
            }
            ;
        }