all, I'm thinking of porting my application from VB.net to the C# based MONO project, so it can run on both Windows and Mac. However, I am in need of a Mac-friendly alternative to WPF. It has to have very similar functionality. QML (by QT) is not a viable option, as it costs far too much money for us.
-
Isn't Windows Forms projected into Mono? Apart from that Silverlight is ported in the form of Moonlight, but sometime I read WPF will never come to the Mono platform – flq Mar 31 '11 at 13:39
-
@Jason - The people behind Mono pretty much have no plans to port WPF for a many reasons. The most important one is there is no "developer" interest in doing so. Moonlight will most likely be the closest thing they will release. There are also technical reasons, if you want true cross-compabitability then a WPF application isn't the solution. – Security Hound Mar 31 '11 at 13:42
-
@flq: Windows Forms and WPF are two different animals entirely, and I already ruled out Windows Forms as being even slightly viable for my application. I have to have a much more powerful visual markup language, such as WPF. – CodeMouse92 Mar 31 '11 at 13:44
-
2QML/Qt is open source and free, including the IDE! How can you say it costs too much? – Dan Puzey Mar 31 '11 at 13:49
-
The company Seesmic has developed their desktop application using Silverlight. And they claim that it works on both mac and windows. – vortexwolf Mar 31 '11 at 16:04
-
There is a Mac plugin for Silverlight 4 for Safari, at least. I'm not sure about out of browser apps, though. – Chris Dunaway Mar 31 '11 at 21:19
-
@Dan: Look again. For commercial use, it costs a few K. – CodeMouse92 Apr 01 '11 at 19:55
-
1@JasonMc92: It costs nothing if you can comply with the LGPL. – Dan Puzey Apr 02 '11 at 08:19
-
@Dan: Which I don't think we'll be doing. I'm shooting for a patent on a good part of the core, and the entire game will be held quite closely by our company through copyrights and TMs (due to our particular market). Thanks, anyway, tho. – CodeMouse92 Apr 02 '11 at 19:53
-
@JasonMc92: you can build commercial, closed-source applications on top of LGPL without problems - many companies do this. I don't believe there's any limitations on patents covering the application, as long as you don't try to patent methods/techniques that are part of the LGPL library. – RichVel Oct 06 '12 at 10:46
-
Here are the three most advanced XAML frameworks in comparison: https://github.com/robloo/PublicDocs/blob/master/XAMLFrameworkComparison.md – Martin Braun Oct 30 '21 at 21:22
5 Answers
There is also https://github.com/AvaloniaUI/Avalonia a multi-platform .NET UI framework inspired by WPF

- 2,701
- 29
- 28
-
1Nothing exist better than Avalonia today. The future belongs to cross platform frameworks. Microsoft is not doing well in this field (Let's rule out Electron, we know who developed the tech). If i had to bet, I'd say Google Flutter will win the race. – pouya Sep 09 '20 at 18:29
Miguel de Icaza recommends MonoMac as a substitute to WPF for Mac as stated here. As he explains there is no plan to implement WPF in mono.
MonoMac is a work-in-progress. Some parts of the Cocoa APIs are not wrapped yet. You should start with the samples to get an idea of what is possible.
You will have to build two different UI on top of a common engine, but that's generally a good separation of concerns.
There is also a possible common code base for UI with GTK#.

- 4,605
- 4
- 40
- 60
-
Separating the UI from the engine is a good practise. But possibly Jason would prefer not to write *two* UIs. – MarkJ Apr 01 '11 at 12:44
-
I'm happy to say that I have a game core built in VB.net, and the WPF portion is wrapped around it. But, yes, writing two UIs would be difficult, for the level of complexity. This is actually a game, fyi, though I prefer getting answers here. The Gamedev folks aren't too helpful w/ programming. – CodeMouse92 Apr 01 '11 at 19:58
-
@JasonMc92 : Did you check GTK# ? I'm not sure about it`s fitting with game development, but that is one free solution for shared UI code, using mono. – Matthieu Apr 01 '11 at 20:30
-
@Matthieu: Isn't MonoMac still incomplete, i.e. some Cocoa APIs are not wrapped? See http://www.mono-project.com/MonoMac#Status – RichVel Oct 06 '12 at 10:49
-
1@RichVel : True, but the projects on github are quite active - The samples could give a good idea of what is possible now https://github.com/mono/monomac/tree/master/samples - even if the devs are requesting more samples. – Matthieu Oct 08 '12 at 13:39
Depending on your application's functionality, you could potentially port your application to Silverlight/Moonlight. Silverlight is supported on the MAC, but you'll need Moonlight for Linux. Of course, if you're doing a lot of work with the client machine's file system or what not, this is not an option.

- 21,818
- 7
- 41
- 51
-
I could probably get away with running database and file actions with the code behind as I have already been doing, and just using Silverlight for my GUI. The main question is, would I be able to use local URIs instead of the standard URLs? I have to run video and the like. – CodeMouse92 Mar 31 '11 at 13:47
-
I think you could do this if you made the application "out of browser". I'm not sure if Moonlight supports this, but if your primary target is a MAC, you might be OK (it all depends on where the files are that you're hitting). – Steve Danner Mar 31 '11 at 13:50
-
Yeah, Linux support isn't super high on my priority list. The biggest file system related actions in my core are saving a programatically-built .txt file, working with a database that is at the same location as the main program, and accessing video and audio files from either the program's folder or a disc (depending on the build version.) – CodeMouse92 Apr 01 '11 at 20:04
tho I have accepted an answer a while back, I want to post what I am doing currently if anyone views this question.
I am currently using Python with PyGTK for the GUI, and GStreamer for the video. This is producing results almost identical to WPF (except some hardcoded animations). Furthermore, it runs on Windows, Mac, and Linux.
EDIT: GStreamer did not pan out for my purposes. While it works well for the most part, I could not layer transparent .png images over the video. I have switched finally to Adobe Flash (Adobe AIR).
EDIT 2: For anyone who comes across this later, when the future of SWF fell into question, my company started building our own animation system in C++, using some components of Gtk+/gtkmm and Cairo. Ultimately, that falls under the advice of the other answer...separate GUI from platform.

- 6,840
- 14
- 73
- 130
-
2
-
1I was simply saying what I wound up doing, as it was a solution for me. (Note, I'm the OP and I didn't accept my own answer.) – CodeMouse92 May 04 '15 at 00:12
Is another alternative to xaml/wpf that is also for video game engines. It currently has a Indie/Free tier up to 100k in revenue, and is cross platform.

- 968
- 7
- 28