CefSharp的一些初始化操作

 if (!CefSharp.Cef.IsInitialized)
{
    var setting = new CefSharp.CefSettings
    {
        Locale = "zh-CN"
    };
    setting.CefCommandLineArgs.Add("disable-gpu", "1");
    CefSharp.Cef.Initialize(setting);
}
ChromiumWebBrowser browser = new ChromiumWebBrowser()
{
    Address = Url
};
browser.LifeSpanHandler = new CefSharpOpenPageSelf();

 

转载于:https://www.cnblogs.com/TimLiuDream/p/9897944.html

你可能感兴趣的:(CefSharp的一些初始化操作)