Hacker News new | past | comments | ask | show | jobs | submit login

Now as .Net becomes more interesting again (for me), can someone comment on the state of GUI app development in .Net?

Can I write cross-platform GUI code, or would I need to re-implement the GUI on every platform?

Do Windows .Net GUI apps (does that mean Windows.Forms?) work just as-is on Linux (and maybe MacOSX)?

What would be the best supported GUI .Net framework? QtSharp? Windows.Forms?

I found some overview here, but not sure if accurate / up-to-date: http://www.mono-project.com/docs/gui/




Cross platform .NET usually means using a native toolkit on each different platform and the result is WPF on Windows, GTK# on Linux, and MonoMac on Mac. The purpose of this is to avoid the uncanny valley of cross platform toolkits like Java Swing at the expense of writing extra UI code.

Some wrappers like Eto.Forms and XWT exist but don't expect drag and drop visual designer tooling.

Thanks to Mono WinForms is sort of cross platform to a certain extent but if you give it a try you'll see why it is not recommended.


    >Cross platform .NET usually means using a native toolkit on each different platform and the result is WPF on Windows, GTK# on Linux, and MonoMac on Mac.
What are the odds Microsoft announces WPF open sourcing and maybe a wrapper of some sorts for OSX support at Build this year? I give it at least 50/50 on the open sourcing part.


AFAIK WPF is managed by the Windows team. All this open sourcing has been happening form the Azure and developer teams. Chances of Windows open sourcing some of their code? Less likely.

As someone who worked on WPF though, I will comment that the code may not actually be too useful. It is heavily tied to Windows and its graphics infrastructure.

I'm more interested in seeing something like Moonlight ported to modern platforms.


WPF is very heavily tied into DirectX and other Windows-only APIs.

Open Sourcing it is one thing, converting that into an engine that can do layout and rendering identically across multiple platforms is non-trivially difficult. Talk to the browser folks on how hard they had to work on that, and they wern't dealing with 3D stuff.


Doubtful. WPF isn't even the recommended GUI toolkit on windows anymore.


According to whom? And what is the current recommended GUI toolkit?


Windows RT (aka Metro, aka Store Apps). It's a model based on WPF but not fully compliant - it took in lessons learned form Silverlight. Call it WPFlight.


That's the toolkit if you want Metro apps, dealing with MS's crappy store, etc. etc. If you want a traditional Windows application that just works, then WPF is fine. (And I think WPF has an option for non-blurry text rendering, whereas every Metro app seems to be blurry.)


Okay, yeah, so still XAML. I've only recently looked into Windows RT, my time was always spent in ASP.NET, so WPF/WinRT/Silverlight, it all seems like the same thing to me, but I do know a lot of Windows app developers that bitch up a storm about the diffs between WinRT XAML and what can be done in WPF :)


The truth is they are essentially the same. I just draw the distinction because porting apps between them isn't always automatic.


If they did that I would be so happy! I think if they did that it would set the CLR up to effectively compete with Java.


I've been messing with Eto.Forms recently. You define everything through code (or optionally in a JSON blob) rather than in a designer, and it tries to use native controls to display your design.

It's pretty solid and easy to use and I'm quite happy with it. If you want an exquisite, beautifully-designed OS X app then you should be looking into having separate frontends per platform anyway, but having tried Eto I find it fits my needs.

It's much better than I expected.


Take a look at XWT[1]. It uses the native rendering on each platform.

[1]: https://github.com/mono/xwt


For mobile forms-based applications, Xamarin.Forms looks pretty good: http://xamarin.com/forms

For cross-platform desktop applications, I've been keeping an eye on Perspex: https://github.com/grokys/Perspex


WinForms works on Mono (but looks like ass). WPF doesn't. The best way is probably Gtk#.


In terms of maturity and feature-completeness, GTK# is the answer. Unfortunately, it's no beauty either.

Especially on Mac it does its own control rendering and, while it tries to match the OS, has problems.

XWT was meant to replace GTK# and has some good underpinnings but it doesn't seem super active right now.


As someone who tried to use WinForms on Mono on Linux, I'll save everyone who tries a few hours evaluation work: don't waste your time.

Text components in particular are very broken. Text selection, context menu, copy and paste, cursor movement, rendering, it's all very shaky.

Use Gtk# on Linux.


Windows.Forms works. RepetierHost is an example of a cross platform mono forms app.

These days I lean towards web services and using the browser as the GUI.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: