HTML 5 CSS 3 Web Browser Control for C# - c#

Is there a web browser-type control that supports much of html 5 and css 3 for C#?
Just asking as I viewed my site designed for modern browsers, but viewed it in the .NET Winforms browser, and it looked rubbish, as that control doesn't support html 5 or css 3.
Thanks, I look forward to hearing from you all.

There is Awesomium which is based on WebKit (Same as Chrome and Safari). It's not entirely free though (unless you're an indie developer making 100k or less or using it for non commercial development).
The WebBrowser control support of HTML5 and CSS3 features depends on the version of IE that is installed. (which means that you can install IE9 on the machine to get better support of these features)

Related

Usage of Firefox Add-ons in C# GeckoFX control

I am writing a browser application using C# Language and GeckoFX Browser library.
Now, I want to add the Mozilla Firefox Add-on to my application.
To be precise, I want my application to block undesirable advertisement using AdBlock Plus add-on for Mozilla.
Is it possible to use a Firefox add-on in my GeckoFX control?
Sadly because Firefox extensions are largely based around the interface and working of Firefox's UI, not just the Gecko interface, I don't think it would be possible at all currently to install extensions or .XPI files.
So in order to do this without using an extension, you may have to code an adblocker yourself which I've been trying to do here.
Otherwise, good luck! I've been having similar issues and am looking towards writing my own solution.

Render page within winforms with one of the installed browsers?

I wanted to make my own "editor" to for html, css, etc, where on one side I have the code and on the other how it looks like on the browser.
I know within c# we have the handy System.Windows.Forms.WebBrowser() that could do that for me but I wanted to be able to make it render as if it was using ie or ff or chrome browsers.
How could I render the page some how as if it was using one of
those (considering they are installed and available within the
computer but to open on the c# winforms) ?
You would have to use the rendering engine that the other browsers use. For example, Chrome and Safari use Webkit. Getting this to work for older browsers like IE6, 7, will be much harder, since they don't release their layout engine. IE9 has a feature that lets you render a page as an older browser, but I'm not sure if you can use that feature using the WebBrowser control.

Firefox C# Wrapper/Control

Is there a Firefox/Mozilla control for embedding the firefox browser in a C# .net application?
You can have the Gecko rendering engine in the form of GeckoFX.
To quote Google Code:
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.
Even better, there is a fork by hindlemail, actively updated DLL for .Net, here: https://bitbucket.org/geckofx/.
Currently, there are available versions corresponding to Firefox's version 10 and 11.

WPF in a browser and printing

Can WPF be hosted in a web browser? If so how? (I think it can as I have seen some examples of it.)
While hosted in the web browser what printing support does it have?
What are the drawbacks to using WPF in a browser?
My company is looking for a rich web app platform. They will not choose Silverlight because it ignores any printing needs (at least as far as I understand). Right now a solution from Adobe is in the lead because it supports printing.
Most (if not all) of the apps written for browsers will be used internally by my company (ie we control the computers and browsers). (We want to use browsers for easy of deployment.)
Have you checked out XBAP (Xaml Browser APplications)?
The major drawbacks I am aware of concern security. When some coworkers of mine were developing an XBAP product, they often ran into problems with security, as the XBAP model is pretty strict.
I can't answer about printing, but I'd tend to think that might be a problem with the security considerations.
Hope I was able to help.
If the apps are solely internal and you control the target platform; and the reason for choosing to host your apps in the browser is 'ease of deployment', I would seriously consider writing Full Trust applications in WPF, and deploying them with ClickOnce... Your users would simply have a shortcut on their desktops that would check a server to see if their version of the app is current, and download the newest version if not.
You get all the benefits of the full WPF platform (greater feature-set than Silverlight), and do not need to conform to the Partial-Trust restrictions of XBAP (although you will need to configure the ClickOnce server to allow for Trusted Application Deployment)
No. That's what Silverlight is for right now and yes there are printing limitations. However, printing anything using a web app is not straight forward.
I would suggest Silverlight/Flex solution for web based app and for printing need the best way to do is use iTextSharp library and generate PDF for your reports or printing need, which can be fetched from a URL. PDF is a very standard and adobe reader will always print it right, printing will not be a problem, we went through lot of options and it requires reinventing wheel where else generating PDF through iTextSharp is very easy as creating normal html in javascript way.

Is there any better web browser control in C# (.NET)?

I need JavaScript working almost perfectly in my application that should be able to access web content and let user take a control of it. However, webbrowser component pops new windows in separate instance / application of Internet Explorer and dotBrowser doesn't work with JavaScript properly.
Please, give me some advice - I'd even take some working example and enhance it with function I need it for.
Give a look to GeckoFX, is on open-source component for embedding the Mozilla Gecko (Firefox) in .NET applications.
I could be mistaken, but I believe new windows can be controlled (or at least suppressed) using the Web Browser control in .NET. Have a look at the NewWindow event.
I have had experience embedding both WebKit (Apple Core, used in Chrome) and XULRunner (Gecko) cores in .NET winforms applications. Let me give you some advice:
GeckoFX is your best bet. It is licensed under MPL and it works pretty much out of the box.
Follow the instructions carefully and pull the exact XUL version that is indicated. I would say it works better than the WebBrowser control. There is some talk of a significant delay when loading XUL for the first time but I've found it to be negligible. Branding and the like is fully customizable via external files.
WebKit is embeddable with SwiftDotNet. If all you need is solid javascript performance then this may be an option. If you need to be able to download files, then you have some work cut out for you.
Your downside with both routes is a nasty ~7-8mb overhead, even with compression (although I was able to get 6.5mb with lz compression in NSIS). If you are not creating distributable consumer-facing software then this may not be a problem for you.

Categories