Questions tagged [dotnetbrowser]

Use this tag for questions about DotNetBrowser, a Chromium-based control which allows .NET applications to display web pages.

Definition:

DotNetBrowser is a .NET Library which allows embedding a Chromium-based control into .NET applications to display modern web pages built with HTML5, CSS3, JavaScript, etc. DotNetBrowser supports both WPF and WinForms .NET graphical subsystems and provides WPF/WinForms UI controls which you can embed into your .NET Desktop Application to display web pages.

Main features:

  • WPF / WinForms Control
  • Display Web Accurately
  • HTML5, CSS3, JavaScript Support
  • Multi-Process Architecture
  • Browser Events Listeners
  • JavaScript Dialogs Handler

A full list of features can be found here: https://www.teamdev.com/dotnetbrowser#features

System requirements:

Microsoft Windows

  • Windows 10, 8, 8.1 & 7
  • Windows Server 2016, 2012 & 2008 R2

Microsoft Visual Studio

  • 2013, 2015 & 2017

.NET Framework

  • 4.0 or higher

More info & reading:

Code example:

WinForms:

BrowserView browserView = new WinFormsBrowserView();
Controls.Add((Control) browserView);
browserView.Browser.LoadURL("http://www.google.com");

WPF:

<Grid Name="mainLayout">
</Grid>

webView = new WPFBrowserView(BrowserFactory.Create());
mainLayout.Children.Add((UIElement)webView.GetComponent());
webView.Browser.LoadURL("http://www.google.com");
161 questions
1
vote
1 answer

DotNetBrowser calling a JS function and returning a value from C#

I see the option where you can initiate the function call in .NET and return a value, but I don't see an option where you are able to initiate a function call in javascript calling a .NET function and then return a value to javascript, similar to…
MattE
  • 1,044
  • 1
  • 14
  • 34
1
vote
1 answer

How to share session and cookies between multiple instances of dotNetBrowser controls

How can we share the session, cookies, and any other context between multiple instances of dotNetBrowser control. I am trying to achieve the following with dotNetBrowser control. Create two instances of a windform application. Each instance is…
Novice
  • 515
  • 7
  • 22
1
vote
1 answer

Cannot acces window object in DotNetBrower

I have no idea what I am doing wrong, I had it working, did a few things and now can't get it working again...the object is there, butI cannot access it, always comes back as undefined. I am passing a JSON string to javascript via the DotNetBrowser…
MattE
  • 1,044
  • 1
  • 14
  • 34
1
vote
1 answer

Loading a local HTML page with embedded javascript files DotNetBrowser

I am looking through the samples and I have yet to come across an example of loading a local HTML file that contains embedded JavaScript inside it. Something like, along with several others for the project on the main index.html…
MattE
  • 1,044
  • 1
  • 14
  • 34
1
vote
1 answer

C# Saving webpage image using DotNetBrowser

I'm having an issue when trying to save a webpage as an image, everything appears to work well in my application until the saving portion. string desktopPath = Environment.GetFolderPath(System.Environment.SpecialFolder.DesktopDirectory); string…
AlphaOmega
  • 117
  • 10
1
vote
1 answer

Sending KeyPress Events to browser using DotNetBrowser

I am trying to fire OnChange event of an input element. Changing the value of the element does not fire onChange event. Is it possible to send a keypress to the browser in order to fire onchange event of the input element.
SR_P
  • 79
  • 6
1
vote
1 answer

Dotnetbrowser running in outlook vsto loosing keypress

We have an Add-in to outlook (VSTO) that contains a form with a webbrowser(Dotnetbrowser). On startup everything works as expected but as soon as the form looses focus, one clicks on a mail for example, the DNB doesn't receive any keyboard…
1
vote
1 answer

Handling Resources Loading - dosen't work

Method described here enter link description here dosen't work. The "ResourceHandler" is interface, so the "CanLoadResource" cant be overrided. Update the documentation and provide a correct way to handle resources loading
1
vote
1 answer

How do I navigate with the browser without using initialize component?

Whenever I use initialize component I lose my data such as the selected index on my combo box. I tried declaring the browser in the form load and then just using the load url function under a button but that did not work. Here is the code: int…
1
vote
1 answer

How to get DOMElement in DOM Event Listener in DotNetBrowser?

With reference to http://dotnetbrowser-support.teamdev.com/documentation/dom-events, I need to add an event listener for the whole document, listening for click events. In the event listener I need to get the DOMElement where the user clicked. Is…
1
vote
1 answer

Download more than 2 files in the same sub using DotNetBrowser

When I try to download 2 or more itens in the same Sub, DotNetBrowser just download the last one. What should i do to download both itens in example? Sub test() _browserview = CType(Me.PanelBrowser.Controls("browsername"), WinFormsBrowserView) …
Eric Otani
  • 13
  • 2
1
vote
2 answers

Why is scrolling is so slow on DotNetBrowser?

We are looking for chromium browser on .net. We are interested DotNetBrowser but there is a issue before decide to continue. Why is scrolling is so slow on DotNetBrowser, chfsharp is much better for scrolling. Is there any solution for this issue…
kadir950
  • 117
  • 12
1
vote
0 answers

c# Dot Net Browser Error | BrowserException was unhandled by user code |

I was trying to use Chrome browser in c# by using Dot Net Browser, However I was getting this error on both Windows Form And WPF c# Applications, I would be so thankful if anyone can help me to solve it. A picture(s) from the…
Jlalt
  • 33
  • 7
1
vote
1 answer

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" + ???); …
jchristof
  • 2,794
  • 7
  • 32
  • 47
1
vote
1 answer

dotnetbrowser with earth plugin too slow

i am testing dotnetbrowser from teamdev.com within an wpf application. when i call google maps 3d functionality like this: https://www.google.com/maps/@50.052475,8.7434217,109a,20y,41.07h,76.14t/data=!3m1!1e3 the viewer works but is very slow. takes…
teenriot
  • 13
  • 2