DotNetBrowser 2.10.0

Install-Package DotNetBrowser -Version 2.10.0
dotnet add package DotNetBrowser --version 2.10.0
<PackageReference Include="DotNetBrowser" Version="2.10.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetBrowser --version 2.10.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DotNetBrowser, 2.10.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install DotNetBrowser as a Cake Addin
#addin nuget:?package=DotNetBrowser&version=2.10.0

// Install DotNetBrowser as a Cake Tool
#tool nuget:?package=DotNetBrowser&version=2.10.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

DotNetBrowser

Integrate a Chromium-based browser into your .NET application to load and process modern web pages built with HTML5, CSS3, JavaScript etc.

To be able to use DotNetBrowser, you should obtain a license. A free 30-day evaluation license can be requested by filling a form at https://www.teamdev.com/dotnetbrowser#evaluate

Deep Chromium integration

DotNetBrowser provides API that can be used to interact with a huge set of various Chromium features directly from the code:

  • DOM API: you can access Document Object Model of the loaded web page, find elements and interact with them, handle and dispatch DOM events for the particular nodes.
  • JS-.NET bridge: you can execute JavaScript on the web page and process the results. You can also inject any .NET object into the web page and then use it in your JavaScript code.
  • Printing API: you can initiate and configure printing programmatically. Printing to PDF is also supported out of box.
  • Network API: you can intercept, redirect, handle, and suppress network requests, override HTTP headers and POST data, filter out incoming and outgoing cookies, change proxy settings on the fly.

See the examples to understand what can be implemented with DotNetBrowser.

Easy deployment

All required Chromium binaries are deployed as DotNetBrowser DLLs and can be extracted automatically during execution. You don't need to pre-install Chromium, Google Chrome, or a Chromium-based runtime to work with DotNetBrowser.

The current release of DotNetBrowser uses Chromium build 94.0.4606.113.

Headless mode

DotNetBrowser can be used in Windows services and server apps. The web page can be loaded and rendered completely in memory without displaying any visible windows. You can then take a screenshot of the loaded web page.

User input simulation

DotNetBrowser provides means to simulate mouse and keyboard input and interact with the web page programmatically - exactly as regular users do.

UI

DotNetBrowser provides UI controls for WPF and Windows Forms applications. These controls can be used to display web pages as integral parts of the .NET applications. It is also possible to use DotNetBrowser to create VSTO add-ins.

Usage

Note: The VB.NET examples can be found in the examples repository.

WPF

XAML

<Window x:Class="Sample.Wpf.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:wpf="clr-namespace:DotNetBrowser.Wpf;assembly=DotNetBrowser.Wpf"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800" Closed="MainWindow_OnClosed">
    <Grid>
        <wpf:BrowserView x:Name="browserView"/>
    </Grid>
</Window>

Code

using System;
using System.Windows
using DotNetBrowser.Browser;
using DotNetBrowser.Engine;

namespace Sample.Wpf {
    public partial class MainWindow : Window {
        private readonly IEngine engine;
        private readonly IBrowser browser;
         
        public MainWindow() {
            InitializeComponent();
             
            // Create and initialize the IEngine
            engine = EngineFactory.Create();
             
            // Create the IBrowser
            browser = engine.CreateBrowser();
            browser.Navigation.LoadUrl("https://teamdev.com/dotnetbrowser");
             
            // Initialize the WPF BrowserView control
            browserView.InitializeFrom(browser);
        }
         
        private void MainWindow_OnClosed(object sender, EventArgs e) {
            browser.Dispose();
            engine.Dispose();
        }
    }
}

Windows Forms

using System;
using System.Windows.Forms;
using DotNetBrowser.Browser;
using DotNetBrowser.Engine;
using DotNetBrowser.WinForms;

namespace Sample.WinForms {
    public partial class Form1 : Form {
        private readonly IEngine engine;
        private readonly IBrowser browser;
         
        public Form1() {
            InitializeComponent();
             
            // Create and initialize the IEngine
            engine = EngineFactory.Create();
             
            // Create the Windows Forms BrowserView control
            BrowserView browserView = new BrowserView() {
                Dock = DockStyle.Fill
            };
             
            // Create the IBrowser
            browser = engine.CreateBrowser();
            browser.Navigation.LoadUrl("https://teamdev.com/dotnetbrowser");
             
            // Initialize the Windows Forms BrowserView control
            browserView.InitializeFrom(browser);
             
            // Add the BrowserView control to the Form
            Controls.Add(browserView);
            Closed += Form1Closed;
        }
         
        private void Form1Closed(object sender, EventArgs e) {
            browser.Dispose();
            engine.Dispose();
        }
    }
}

NuGet packages (3)

Showing the top 3 NuGet packages that depend on DotNetBrowser:

Package Downloads
DotNetBrowser.Wpf

A Chromium-based WPF component that can be embedded into your .NET application to display modern web pages built with HTML5, CSS3, JavaScript etc. To be able to use DotNetBrowser, you should obtain a licence by filling a form at https://www.teamdev.com/dotnetbrowser#evaluate

DotNetBrowser.WinForms

A Chromium-based WinForms component that can be embedded into your .NET application to display modern web pages built with HTML5, CSS3, JavaScript etc. To be able to use DotNetBrowser, you should obtain a licence by filling a form at https://www.teamdev.com/dotnetbrowser#evaluate

OpenSilver.Simulator

OpenSilver is an open-source reimplementation of Silverlight that runs on current browsers via WebAssembly.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on DotNetBrowser:

Repository Stars
OpenSilver/OpenSilver
This repository contains the source of both OpenSilver and CSHTML5. More information is available at: www.opensilver.net and www.cshtml5.com - Read README.md for the instructions on how to build the source code and how to test it.
Necrobot-Private/NecroBot
NecroBot2
Version Downloads Last updated
2.10.0 574 11/18/2021
2.9.0 3,954 9/24/2021
2.8.0 2,217 8/20/2021
2.7.0 780 7/26/2021
2.6.0 2,220 5/27/2021
2.5.0 2,948 4/7/2021
2.4.0 2,707 3/2/2021
2.3.0 6,117 11/26/2020
2.2.0 3,871 9/9/2020
2.1.1 5,151 7/2/2020
2.1.0 893 6/18/2020
2.0.0 5,402 2/27/2020
1.21.5 13,676 2/25/2020
1.21.4 429 2/24/2020
1.21.3 869 2/11/2020
1.21.2 2,165 12/25/2019
1.21.1 4,771 10/24/2019
1.21.0 2,443 8/20/2019
1.20.1 3,712 6/11/2019
1.20.0 3,779 4/1/2019
1.19.1 5,315 1/14/2019
1.19.0 3,068 11/27/2018
1.18.0 2,287 10/8/2018
1.17.0 3,370 8/31/2018
1.16.0 7,499 6/29/2018
1.15.0 1,864 6/4/2018
1.14.4 845 6/15/2018
1.14.3 2,479 5/16/2018
1.14.2 3,909 4/11/2018
1.14.0 21,534 11/30/2017
1.13.0 2,304 10/18/2017
1.12.0 1,665 9/20/2017
1.11.1 1,916 8/14/2017
1.11.0 3,809 6/26/2017
1.10.0 3,320 4/27/2017
1.9.0 2,528 2/3/2017
1.8.4 2,413 12/19/2016
1.8.3 1,238 11/21/2016
1.8.2 1,176 10/17/2016
1.8.1 1,036 9/12/2016
1.8.0 1,369 8/8/2016
1.7.1 914 7/4/2016
1.7.0 1,361 6/6/2016
1.6.4 3,210 4/27/2016
1.6.3 844 4/4/2016
1.6.2 1,011 3/2/2016
1.6.1 1,024 2/1/2016
1.6.0 1,086 12/18/2015
1.5.2 1,060 11/30/2015
1.5.1 1,012 11/12/2015
1.5.0 1,000 11/3/2015
1.4.0 948 11/3/2015
1.3.0 1,409 9/21/2015

Chromium has been upgraded to version 94.0.4606.113.

WebRTC screen sharing is now supported.

The printing API has been extended. It now allows you to set custom headers/footers as well as scaling for the printed document.

For full list of fixes and improvements, see our release notes:
https://dotnetbrowser-support.teamdev.com/release-notes/2021/v2-10.html