Custom Web Browser control with support of new CSS3 features - c#

I'm looking a custom web browser control for .net framework.
There is bunch of them here, but they are old and can't run new CSS3 features smoothly (or they simply can't!). For example, Awesomium and Webkit.NET are available but they can't run animations/transitions hardware-accelerated.
But, new web browsers (Chrome 21, Firefox 15) are supporting these new features smooth and hardware-accelerated.
Is there any .Net Web Brower control with support of new HTML5/CSS3 features?

You can always use chromium from .NET. Chromium support latest features. The Chromium Embedded Framework (CEF) is an open source project to develop a Web browser control based on the Google Chromium project. There's a .NET version already working (CEF1), you can implement it, not easy but definitively possible, see the link provided for the specific documentation.
Also, there is a CEF3 wrapper for .Net, you can download the binaries under the official forums.
CEF3 Supports 3D while CEF1 not.
Update: You can download latest binaries of CEF3 wrapper from here.

If you really don't need CEF1/3 why not to try GeckoFX control?
It's quite gentle, supports css3, html5 with audio/video tags, webgl and the project seems to be active developed.

Related

Display Html page via url in Winforms in .Net6

I am trying to to display an HTML page in Winforms by using a url of the said page.
I have tried it in .Net Framework, it works using WebBrowser tool and gives the exact result needed but this tool is not available in .Net 6 and I have to make it in .Net 6.
I even tried to implement WPF control but even the ElementHost tool is not available in .Net 6.
Is there an alternative method way to display Html or use .Net Framework tools in .Net 6?
Sorry for the lack of code since Winforms is mostly drag and drop, I will add any required code if needed.
The newest (at time of writing) in-app browser control by Microsoft is WebView2. It's based on the latest Edge browser.
Here is a link to the Microsoft documentation on how to set it up for WinForms

Replacing Latest .NET WebBrowser Control with a browser, like Firefox or Chrome

I am using Visual Studio C# found an ActiveX control but it looks like it's an old version.
I need:
A browser that can integrate inside a window of my application (not a
separate window)
A good support for CSS, js and other web technologies, on par with
any modern browser
Basic browser functions like "navigate", "back", "reload"... Liberal
access to the page code and output.
Take a look at CefSharp: https://github.com/cefsharp/CefSharp
CefSharp lets you embed Chromium in .NET apps. It is a lightweight .NET wrapper around the Chromium Embedded Framework (CEF) by Marshall A. Greenblatt. About 30% of the bindings are written in C++/CLI with the majority of code here is C#. It can be used from C# or VB, or any other CLR language. CefSharp provides both WPF and WinForms web browser control implementations.
take a look at GeckoFx https://bitbucket.org/geckofx/. I was using it about 2 year ago and it was pretty easy to use. It's free and not "dead", meaning it is being keeped up to date.
DotNetBrowser can satisfy your needs.
This library provides Chromium-based WPF and WinForms components that can be embedded into your .NET application. The component supports HTML5, CSS, JavaScript, DOM access, DOM events and even calling JavaScript from C# and vice versa.
DotNetBrowser API also provides basic browser functions like loading URLs and HTML, reloading page, navigating back and forward, working with cookies, etc. Actually, all its functions are perfectly described in the product's Knowledge Base.
The control is commercial,but there are free academic and open-source licenses.
SharpBrowser based on cefsharp . accidentally found it while browsing the cefsharp repos
http://github.com/sharpbrowser/SharpBrowser

Resources to create your own html 5 / css3 layout engine in C#

Are there any resources out there for how to create your own layout engine (like webkit) in C#, that supports html 5 and css 3, preferably through MSHTML, or anything else.
Also, if the above is impossible, how can I add on to the webbrowsercontrol in WinForms .NET to help it support the latest web standards.
Thanks.
You can't change MSHTML, but you can use a different control instead of the default IE based one. Webkit, you can try https://github.com/webkitdotnet (Still looks somewhat experimental though), and GeckoFX http://www.geckofx.org/ which aims to be a drop-in replacement using Gecko (Firefox layout engine).
I'm not sure if they both support all the features the normal WebBrowserControl does though.

C# html5 web browser object

I am attempting to make a web browser object in C# which support html5 as good as Safari or Chrome. My main goal is for playing video, or supporting the video tag. So far i have got WebKit.Net working and playing html5 video off w3schools website, but this only works when quicktime is installed; and i really hate that route. I read http://en.wikipedia.org/wiki/HTML5_video so i know somewhat why quick time is needed.
I am currently attempting to wrap up chromium into a C# web browser object. Do you have any suggestions on how i can accomplish creating a C# Web Browser which support html5?
You could also check out my new project: https://github.com/chillitom/CefSharp
This brings the Chromium Embedded Framework to .Net / C#. See the Github page for source, binaries and example.
Some features:
a browser control with navigation commands
INotifyPropertyChanged events
ExecuteJavascript
Register your own scheme/protocol handlers
intercept resource downloads
bind CLR objects into Chromium's JavaScript context.
It's still in the pre-alpha stages so all feedback appreciated.
If you're using WPF, you can use http://chriscavanagh.wordpress.com/2009/08/25/a-real-wpf-webbrowser/. This is a Chromium implementation for WPF.

Is it possible to Embed Gecko or Webkit in a Windows Form just like a WebView?

I'd love to know if there is such a thing as a Gecko.NET ;) I mean, just like we can embed a WebView and that is an "instance" of IE7 inside any Windows Forms application (and tell it to navigateto(fancy_url);). I'd love to use Firefox or WebKit.
Anybody tried this?
UPDATE: Please bear in mind that although it is possible to embed Gecko using the mentioned controls, it is still impossible to print while using Gecko.
UPDATE March 2010: It’s still not possible to print natively using GeckoFX, however a couple of methods exist that may be enough, depending upon what you’re trying to do.
See: http://geckofx.org/viewtopic.php?id=796 for more information.
UPDATE October 2013: I am no longer doing Windows development so I have no interest in this, but seems like the development of Gecko can be found here: https://bitbucket.org/geckofx and it seems to be recently updated. Leaving this here for future Windows devs ;)
UPDATE January 2017: I have gotten an email from a company called TeamDev. They created a Chromium-based .NET browser component called "DotNetBrowser" which can be used to display modern web pages in Windows Forms applications.
To quote the email directly:
Here are some details about the component, which might be helpful:
DotNetBrowser is based on Chromium, thus supporting HTML5, CSS3, JS and the latest web standards. The underlying Chromium version of the library is regularly updated.
The component is suitable for WPF as well as Windows Forms desktop applications, and works both for C# and VB.NET.
The library is licensed commercially, however free licences are provided for Open Source and academic projects.
Disclaimer: I have not used this DotNetBrowser for I no longer do Windows Development but may be worth checking if you're looking for a solution to this.
http://code.google.com/p/geckofx/
This is a nice .NET-wrapped version of Gecko
It certainly is possible. All you need to do is register the Mozilla ActiveX control (mozctlx.dll I believe), and you can drag it onto your form as any ActiveX control. The programming interface is similar (though not identical) to the IE one, and you can even use the Microsoft.MSHTML.dll managed library for control in some cases.
I believe this is packaged with Firefox. If not, you can get just the embeddable bits from Mozilla as well. Just do a Google search for Mozilla ActiveX control or Mozilla Embedding C# and that should take you down the right path.
GeckoFX is no longer being updated. The alternative is the MozNet XulRunner wrapper by Se7en Soft. MozNet has a ton of features that GeckoFX doesn't and is being actively updated and maintained.
I'd just like to point out, to all looking to embed Gecko into their applications, that the GeckoFX project appears to have been abandoned by its creators (Skybound Software). MozNET, while previously based on GeckoFX, sorta' picked up the ball and ran with it. It has the full ability to print, do print previews and allows you to set it all up via the native Windows print dialog, even - and a whole lot more.
OpenWebKitSharp is a wrapper arount the WebKit engine (nightly) and is very advanced. Take a look at here (OpenWebKitSharp section): http://code.google.com/p/open-webkit-sharp/
Update 2016:
BrowseEmAll.Gecko
A .Net component which can be used to integrate the Firefox engine into your .Net application. This is based on Geckofx but unlike the current version of Geckofx this will work with a normal release build of Firefox. To use Geckofx you will need to build Firefox yourself. Again commercial support is available but the component itself is fully open source.
(Full disclosure: I work for this company so take everything I say with a grain of salt)
#Martin: Yes, the Adam Locke version is outdated. But that's because a separate distribution is not necessary. It's built with the rest of the Mozilla codebase now.
If you download Prism (ie XulRunner), that will give you a base that you can customize to your needs, and this includes the most recent version of the control (in the \Prism\xulrunner directory, you'll find mozctlx.dll).
#Greg: Actually, it is an ActiveX control. Incidentally, all ActiveX controls are COM controls. ActiveX is built on COM.
As of October 30, 2011, there is new information to add since the time of the previous posts. Specifically, while Skybound stopped maintaining their version, there is at least one actively maintained, free, open-source fork available.
I'm using Hindle's fork at BitBucket, which, by virtue of his tool which parses XpCom idls and creates c# wrappers, is rapidly updated with support for each new version of Firefox/Gecko.
See this post for an overview of other choices.
Additionally, if you find yourself using Gtk instead of Windows.Forms, there is a tarball of webkit-sharp available that allows for easy embedding of WebViews into Gtk# applications.
I Belive "Gecko FX"[1] is the thing you need.
To Quote from the web site
"""
GeckoFX is a Windows Forms control written in clean, commented C# that embeds the Mozilla Gecko browser control in any Windows Forms Application. It also contains a simple class model providing access to the HTML and CSS DOM.
"""
1) I can't post a link as "new users aren't allowed to add hyperlinks" Search for "geckofx" on google code.

Categories

Resources