-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Upgrading from CefSharp 1
Alex Maitland edited this page Jun 15, 2015
·
4 revisions
Things to note when Upgrading from CefSharp 1
Switch CefSharp Version
- Remove CefSharp1 References (CefSharp, CefSharp.WinForms)
- Delete all libs / locales of CefSharp1
- Close Visual Studio completely and then reopen
- Install CefSharp3 through Nuget (I just installed CefSharp.WinForms - it installs all required libraries as well)
- Close Visual Studio completely and then reopen
- Specify platform (x86 / x64)
Change class names
- Renamed
WebView
toChromiumWebBrowser
- Renamed
LoadCompleted
toFrameLoadEnd
- Renamed
CEF
toCef
- Renamed
CefSharp.Settings
toCefSettings
- Change BrowserSettings initialization
webView = new WebView(url, browserSettings);
to this
webView = new ChromiumWebBrowser(url);
webView.BrowserSettings = browserSettings;
- Rename
ExecuteScript
toExecuteScriptAsync
- No more
webView.PropertyChanged
(Use individual events inWinForms
or DataBinding inWPF
) - Change
RequestHandler
:- remove
RequestHandle
andDownloadHandler
class implementations - add DownloadHandler
- change
webView.RequestHandler = new RequestHandler(); to webView.DownloadHandler = new DownloadHandler();
- remove
-
ILifeSpanHandler.OnBeforePopup
has different parameters- so Implement Interface of
ILifeSpanHandler
and remove the old function signature
- so Implement Interface of
Your problem not listed here? Check out https://github.com/cefsharp/CefSharp/issues?q=is%3Aissue+label%3Acef1-cef3-upgrade or try searching on the CefSharp Google Group