Exemple #1
0
        public MainWindow()
        {
            InitializeComponent();
            WebBrowser.CSharpEventsBinding(new JsEvent(), false);
            Thread th = new Thread(() => {
                while (!(WebBrowser.IsChromeLoaded && WebBrowser.IsDocumentLoaded))
                {
                    Thread.Sleep(15);
                }
                //WebBrowser.InvokeScript("Init", new object[] { "a" });
            });

            th.IsBackground = true;
            th.Start();
            Uri uri = new Uri("D:\\Project Code\\CefDemo\\CefDemo\\CefDemo\\Test.html");

            WebBrowser.Navigate(uri);
        }