Search code examples
dotnetbrowser

DotNetBrowser create lightweight browser from SetChromiumSwitches()


Is there a set of switches that will cause the default browser to be lightweight instead of heavyweight? I'd prefer to create the browser in Xaml and default to lightweight:

    ...
    BrowserPreferences.SetChromiumSwitches("--disable-gpu" + ???);
    InitializeComponent();

...
            <wpf:WPFBrowserView x:Name="webControl"
                Width="{Binding Width}"
                Height="{Binding Height}"
                ConsoleMessageEvent="WebControl_OnConsoleMessageEvent"  
                FailLoadingFrameEvent="WebControl_OnFailLoadingFrameEvent"
                FinishLoadingFrameEvent="WebControl_OnFinishLoadingFrameEvent"              
                DocumentLoadedInMainFrameEvent="WebControl_OnDocumentLoadedInMainFrameEvent"                        
                Loaded="WebControl_OnLoaded"      >

Solution

  • Chromium switches are not related to the DotNetBrowser rendering mode.

    For the current version, the only way to create a lightweight component is to use the non-default constructor of the WPFBrowserView class.