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.
Related
I need display html5 document in my xamarin application, i need support for html5, css3, javascript and ajax. Is there any solution to display it?
The built in UIWebView in iOS is always quite limited in what it can do. Especially when you want a lot of fancy stuff like the technologies you mentioned. In iOS8 the WKWebView and the WebKit framework was introduced which is said to be a lot better but I have yet to work with it. I believe Xamarin Forms uses UIWebView under the hood though.
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
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.
According to this slide
http://media.infragistics.com/community/general/windows8-platform-tools.jpg
Does it mean I have to use XAML view with C# if I want to develop a metro styled application?
Can I use a HTML/JS/CSS - C# combination with event handlers and all? Something like ASP.NET Webforms/MVC . I know it is not the same client server architecture, but since metro styled apps support HTML/JS, I was wondering.
I can use Win-JS. But can I rather write C# than Javascript, and use HTML rather than XAML?(I dont know XAML and I like C#)
All the C# samples I found online use XAML.
Perhaps you can write portions of your program logic in C# and package it as a library and then create a HTML5/JS app that references the C# Library. That way you should only need to use JS for the parts that are directly related to UI functions and C# for the rest.
I will point out that I haven't tried it yet, but Bill in this thread says that he got it to work.
No, you can only use XAML with C#, or HTML+CSS+JS. But XAML is great markup language, so I think you able to use it.
You can create a "WinMD" library in c# (or c++) that can be invoked from JavaScript. There are a ton of limitations that WinMD libraries have over normal .net libraries and the usage model would be would at all like ASP.NET MVC. Frankly, unless you have a lot of business logic in c# already or if you want to reuse a bunch of code in Win8 Metro apps spanning both HTML and XAML, this WinMD thing is more hassle than its worth.
According to MSDN - Dev Center - Metro style apps you can use C#/VB/C++ and XAML and JavaScript and HTML5 to develop a metro styled application (for Windows8/WindowsPhone).
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.