DotNetBrowser | |
---|---|
Developer(s) | TeamDev |
Initial release | 6 April 2015 |
Stable release | |
Written in | C#, C++ |
Operating system | Microsoft Windows, Linux, macOS |
Type | Framework, Web browser |
License | Proprietary [2] |
Website | https://teamdev.com/dotnetbrowser |
DotNetBrowser is a proprietary .NET library that provides a Chromium-based engine which can be used to load and display web pages. [3] [4] [5] It is developed and supported by TeamDev since 2015.
Some main features are as follows:
Primary usage is embedding a browser into various .NET desktop applications and displaying the web pages. [10] DotNetBrowser can be used as a headless browser. The headless mode is also available on Linux and macOS.
Another known use-cases are creating web-based kiosk applications [11] and VSTO add-ins for Microsoft Office. [12]
More examples and use-cases are available in the DotNetBrowser Examples repository.
XAML markup
<Windowx: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:BrowserViewx:Name="browserView"/></Grid></Window>
C#
usingSystem;usingSystem.WindowsusingDotNetBrowser.Browser;usingDotNetBrowser.Engine;namespaceSample.Wpf;publicpartialclassMainWindow:Window{privatereadonlyIEngine_engine;privatereadonlyIBrowser_browser;publicMainWindow(){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 controlbrowserView.InitializeFrom(browser);}privatevoidMainWindow_OnClosed(objectsender,EventArgse){_browser.Dispose();_engine.Dispose();}}
C#
usingSystem;usingSystem.Windows.Forms;usingDotNetBrowser.Browser;usingDotNetBrowser.Engine;usingDotNetBrowser.WinForms;namespaceSample.WinForms;publicpartialclassForm1:Form{privatereadonlyIEngine_engine;privatereadonlyIBrowser_browser;publicForm1(){InitializeComponent();// Create and initialize the IEngine_engine=EngineFactory.Create();// Create the Windows Forms BrowserView controlvarbrowserView=newBrowserView{Dock=DockStyle.Fill};// Create the IBrowser_browser=engine.CreateBrowser();_browser.Navigation.LoadUrl("https://teamdev.com/dotnetbrowser");// Initialize the Windows Forms BrowserView controlbrowserView.InitializeFrom(browser);// Add the BrowserView control to the FormControls.Add(browserView);Closed+=Form1Closed;}privatevoidForm1Closed(objectsender,EventArgse){_browser.Dispose();_engine.Dispose();}}
{{cite web}}
: Missing or empty |title=
(help)