Can I create a standalone (not ran in browser, having full trust) application with Moonlight?
Asked Answered
U

2

8

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?

Uraemia answered 6/6, 2010 at 5:10 Comment(2)
Seems like nobody knows except for Moonlight developers. Probably you need to go to moonlight forums and ask the question there.Catarinacatarrh
Silverlight/Moonlight aren't WPF, they do use XAML. Also the Mac is a supported Silverlight platform so you won't have to use Moonlight there.Anthea
M
2

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.

Motorcycle answered 3/7, 2010 at 19:59 Comment(3)
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.Catarinacatarrh
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.Uraemia
Anyway Moonlight is bad choise for standalone applications. It have a lot of restrictions. Check this #3186966 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).Motorcycle
S
1

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.

Sushi answered 6/6, 2010 at 13:13 Comment(1)
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.Staphyloplasty

© 2022 - 2024 — McMap. All rights reserved.