DotNetBrowser is based on the Chromium engine. There are lots of command lines (switches) which can be used with Chromium. Some of them change the behavior of features, others are for debugging or experimenting.

DotNetBrowser provides API that allows configuring Chromium with command line switches. You can provide the list of command line switches before you create any Browser instance. The following code demonstrates how to do it:

//these switches allow loading file resources from the file system:

All the switches must be specified before creating any BrowserView instance.


The following sample demonstrates how to disable web security and allow file access from HTML via appropriate Chromium switches:


<Window x:Class="ChromiumSwitchesSample.MainWindow"  
Title="MainWindow" Height="350" Width="525" Closing="Window_Closing"> 
     <Grid Name="mainLayout">  
        <wpf:WPFBrowserView Name="browserView" />  


using DotNetBrowser;
using DotNetBrowser.WPF;
using System;
using System.Windows;

namespace ChromiumSwitchesSample
   /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
        public MainWindow()
            //use the absolute path to files
                "<html><body>Image:<img src='file:///C:\\image.jpg'></body></html>");

Useful Switches

  • --disable-pinch – disables touch-screen pinch gestures.
  • --disable-gpu – disables GPU hardware acceleration.
  • --overscroll-history-navigation=0 – disables history navigation on horizontal overscroll.
  • --ppapi-flash-path ,--ppapi-flash-version – allows specifying the path to the PPAPI Flash plugin version DLL. Specifying its version is required.
  • --force-renderer-accessibility – forces Chromium accessibility to be enabled at launch. If this flag is specified, the contents of the control running in the heavyweight mode will be available for UI Automation.