Esempio n. 1
0
        private void UiBrowser_OnLoaded(object sender, RoutedEventArgs e)
        {
            if (_browser == null)
            {
                _browser = new ChromiumWebBrowser(Adress);

                _browser.RenderProcessMessageHandler = new RenderProcessMessageHandler(OnDOMLoaded);

                //Wait for the page to finish loading (all resources will have been loaded, rendering is likely still happening)
                _browser.LoadingStateChanged += (s, args) => { OnLoadingStateChanged?.Invoke(s, args); };

                //Wait for the MainFrame to finish loading
                _browser.FrameLoadEnd += (s, args) => { OnFrameEndLoad?.Invoke(s, args); };

                _browser.FrameLoadStart += (o, args) => { OnFrameStartLoad?.Invoke(o, args); };

                OnBrowserInited?.Invoke();
            }
            FormsHost.Child = _browser;
        }
Esempio n. 2
0
 private void ExtendedBrowser_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e)
 {
     OnLoadingStateChanged?.Invoke(this, e);
 }