void CefWrapper_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { EmployeeId = (int)e.NewValue; if (_isCefInitialized) { var urlToNavigate = "http://*****:*****@"CEF is not initialized. (This is ok in design-mode! If this happens at runtime, you need to call MapWrapper.InitializeChromiumEmbedded() before instantiating the MapWrapper-control.)" }; } }
public MainWindow() { InitializeComponent(); CEF.Initialize(new Settings { CachePath = @".\cachepath" }); var browserSettings = new BrowserSettings { UniversalAccessFromFileUrlsAllowed = true }; var urlToNavigate = AppDomain.CurrentDomain.BaseDirectory + @"client\index.html"; webView = new WebView(urlToNavigate, browserSettings); webView.LoadCompleted += webView_LoadCompleted; webView.RegisterJsObject("cefCallback", new CefBridge()); CefSharpContainer.Children.Add(webView); }