views:

282

answers:

2

I look forward to develop a WPF MVVC application which is to be ran both on Windows with .Net Framework and Mac/Linux with Mono.

As far as I understand the only part of of WPF implemented in Mono is Silverlight as Moonlight.

As far as I've read it is possible to develop a standalone application with Silverlight 3, but is it possible with Moonlight 2?

+1  A: 

What you describe sounds possible. Moonlight 2 is reported to have out-of-browser capability.

There is much in WPF that is not available in either Silverlight or Moonlight. Your WPF implementation will need to avoid those UI elements that are not available in Silverlight/Moonlight.

Microsoft has done some work in the area of creating applications that can be multi-targeted at WPF and Silverlight. Their Prism library supports this. The issues that you face should be similar.

If your application is capable of running in the Silverlight out-of-browser sandbox it might be easier to target Silverlight on Windows and Moonlight on Linux/OSX. If not, you will need to make sure that access to the needed resources are available from Moonlight on the Linux/OSX platforms.

Jim Reineri
I think Silverlight is pretty well supported on OSX, but I'm not sure about Silverlight out-of-browser on OSX. That would be nice to know.
kenny
+1  A: 

Moonlight supports out-of-browser but with restrictions: this is currently a manual process, not yet automated, and without a GUI (c) Miguel de Icaza. But I think using Moonlight as standalone GUI application is not very good idea. Because first of all it's is client side technology for web sites with many strict restrictions. So it will be impossible to do something serious (like accessing files) using standalone Moonlight. Look at GTK#. It might be more useful for you.

zenonych
With GTK# I can't use XAML. The advantages of XAML are the things people would like to use in application development. All people want is to create rich UI application (using XAML) and be able to run it on all major Operation Systems.
Vasiliy Borovyak
Gtk# looks very weird for me (a WinForms developer) and an I don't want to make Windows users to install GTK, GTK# and Mono - I want my application to run "out of the box" without any preparations on any system having an up-to date version of .Net Framework or Mono installed.
Ivan
Anyway Moonlight is bad choise for standalone applications. It have a lot of restrictions. Check this http://stackoverflow.com/questions/3186466/list-of-silverlight-limitations-restrictions/3190886 to obtain list of restrictions for silverlight 4. Also keep in mind that Moonlight equals to Silverlight 2 with some features from Silverlight 3 (so Moonlight have even more restrictions).
zenonych