views:

231

answers:

5

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.)

+2  A: 

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.

NickAldwin
In .Net 4.0 XBAP can run under full trust according to http://blogs.msdn.com/jaimer/archive/2009/05/27/wpf-4-and-net-framework-4-beta-1-list-of-features-totrack.aspx
Lars Truijens
XBAP only works for IE and FireFox (with addon) on Windows machines. Silverlight supports more browsers and platforms like Linux and MacOSX
Lars Truijens
And Chrome, but you have to manually copy the DLL from Firefox's folder.
NickAldwin
A: 

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.

nick
+1  A: 

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)

IanR
A: 

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.

Akash Kava