WPF and CefSharp: sluggish performance

前端 未结 2 501
野趣味
野趣味 2021-01-21 12:28

I have successfully made a personal mini browser app in c# winforms. Because I want some more fancy effects, I was considering to make a WPF app. So I tried the wiki tutorial an

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-21 13:16

    This will disable WebGL, look at the source to determine which flags best suite your requirements. "grMain" is a Grid in Wpf

    CefSettings s = new CefSettings();
    s.SetOffScreenRenderingBestPerformanceArgs();
    Cef.Initialize(s);
    ChromiumWebBrowser wbMain = new ChromiumWebBrowser();
    grMain.Children.Add(wbMain);
    

提交回复
热议问题