Should never rely on webBrowser; it's the backing field for the WebBrowser property (which should be used instead of going straight to the backing field...).

This commit is contained in:
Per Lundberg
2014-04-02 17:56:19 +01:00
parent bb91eca194
commit 75b4d130c7
@@ -125,7 +125,7 @@ namespace CefSharp.Wpf.Example.Views.Main
// TODO: This is a bit of a hack. It would be nicer/cleaner to give the webBrowser focus in the Go()
// TODO: method, but it seems like "something" gets messed up (= doesn't work correctly) if we give it
// TODO: focus "too early" in the loading process...
WebBrowser.LoadCompleted += delegate { Application.Current.Dispatcher.BeginInvoke((Action)(() => webBrowser.Focus())); };
WebBrowser.LoadCompleted += delegate { Application.Current.Dispatcher.BeginInvoke((Action)(() => WebBrowser.Focus())); };
}
break;