I love programming with .NET, especially C# 3.0, .NET 3.5 and WPF. But what I especially like is that with Mono .NET is really platform-independent.
Now I heard about the Olive Project in Mono. I couldn't find some kind of Beta.
Does it already work? Have any of you made any experiences with it?
Edit: I know about Moonlight. But I want a standalone WPF application. And because of Moonlight I hope WPF on Linux will become true.
You'll have better luck working with Moonlight, which targets the Silverlight API, which is a subset of full WPF.
edit: Sure, Silverlight isn't "intended" for the desktop, but there's no reason why you can't embed a silverlight engine in your application. It's been done before, such as for the Mac NY Times Reader
more edit: see Miguel's post on Standalone Silverlight Applications
Update: Since people keep upvoting this, I want to point out it is long since out of date. Mono got acquired by MS years ago, and their posture regarding open-source has changed, so consider this post obsolete. (As obsolete as the WPF framework itself, heh).
Mono is in a bit of an uncomfortable position when it comes to Microsoft APIs such as Winforms and WPF. A subset of the .Net technology is an ECMA standard, but free implementations of these APIs are probably on shakier legal ground. I believe this was a large factor in the covenant between Novell and Microsoft, which is good for Novell customers. But people who use Mono that aren't customers of Novell aren't protected. For this reason a lot of people in the F/OSS community look askance at Mono despite its technical merits.
For this reason, Gtk# will always be preferred, since it is truly Free. Many people consider it to be superior to Winforms anyway. As far as WPF is concerned, it will almost certainly be a low priority for Novell. They may implement it eventually, but I would expect Moonlight to be the closest you could get for the forseeable future.
Since posting this, Microsoft has extended their covenant to anybody who implements the ECMA 334 & 335 standards.
From the mono website
At this point, the Mono project does
not have plans to implement Windows
Presentation Foundation APIs as
part of the project.
Moonlight is an implementation of silverlight, which is a browser based flash like technology based on a subset of WPF.
In my opinion the choice to not implement WPF is monos biggest mistake. As WPF is fast becoming the default choice for new .net user interfaces. See this blog for more.
There is a library called Silverform SDK that aims to provide cross-platform WPF and Silverlight implementation.
The library is implemented in managed code and currently works with OpenTK and Unity3D as render backends. Major functionality, such as binding, layout, main controls and primitives, has already been implemented (check Unity web player demos here). Initially it has been focused on Unity3d render, while support for standalone Mono applications will be added as a separate build in the future.
Disclaimer: I am one of the developers of the library.
If you check Known bugs of this link(also includes steps needed to install .NET onto Ubuntu)or this you may find that some(may be buggy) version of WPF works on Wine as for now. I did not find any definite test done as for now, but worth to try to run WPF "Hello world".
UPDATE2:
I have run latest IlSpy on latest Wine for Ubuntu 16.04. With 32 bit version of dotnet45 and corefonts installed via winetricks with windows 7 compatibility.
For this time no crashes and all things work fine. Fonts look really good.
IlSpy is shown via WPF and for person who loves programming with .NET is essential tool - the decompiler.
I downloaded latest portable SharpDevelop(build using WPF) with no extra. It started. Failed to create WPF project. Created WinForms. After opening some cs files and evidencing some glitches, tried to type - and it crashed.
UPDATE
I followed steps and got latest ILSpy.exe running on Ubuntu 14.4.
Next items to note:
wine stated that dotnet40 is not supported by 64 configuration, changed to 32 bit
fonts are ugly, but readable
basic functional works fine - I can see decompiled code - which is good enough for some development, but View -> Search and View -> Options -> Display crash.
Conclusion:
WPF on Linux is possible. But need some way to tackle issues.
From the Olive home page:
Olive is unsupported, should be
considered as experimental software,
and since it implements a shifting API
there are no guarantees of any kind
about the stability of the API.
I doubt anyone would have used it in a real project.
Yes, it is possible using NoesisGUI a real-time multi-platform XAML implementation. There are a few games already released using this technology in Linux, like VoidExpanse
Disclosure: I am one of the developers of this product.
I heard a podcast interviewing miguel de icaza (the mono lead) maybe a few weeks ago, so that would have been maybe mid-december 2008, and he said that they had no WPF support at all yet.
Theoretically, a stripped version of WPF COULD be compiled against WinPR or LibWine to run on Linux.
Currently there is no such setup, so someone would need to make one. Hopefully this might change soon.
As of running against or in a full Wine environment, I think that is seriously overkill and will result in too much bloat to be worth making a very small number of additional programs work.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I'm building an application for multiple desktop platforms: Windows, Mac, and maybe later for Linux.
I was wondering which programming language and IDE combination would be the best for me:
Programming language need to be whether C# (preferred) or Java.
Core libraries must be shared between all platforms, means all platforms must link to a single core library (by library I mean a list of classes and functions).
Windows and Mac are in priority, Linux app is for future plannings.
Design of the app is completely custom, it doesn't follow any guidelines of each platforms.
I'm stuck between these three solutions:
Use Xamarin.Mac + Visual Studio for Windows and link the core classes between them.
Use GTK# for the whole project and compile multiple builds for each platforms.
Use Java for the whole project and compile multiple builds for each platforms.
For #2 and #3, I need an advice that which language is more suitable for me, considering the design of my application. I mean, which one has a better GUI building ability for my goal?
BTW GTK# uses different libraries for each platforms, so that should be an clutter for my core architecture, or not?!
Three years later and Javascript is now also a strong contender in this debate.
There are multiple options within the space.
https://electron.atom.io/
https://github.com/nwjs/nw.js/
And others
Even Microsoft has shipped Visual Studio Code, the cross platform version of their development environment, which is written in Javascript.
What is the Visual Studio Code editor built on
The benefits include utilizing the many available web libraries, and building/using your web development skills.
This sounds like a job for Xojo or something similar: http://www.xojo.com
Mac, Windows, Linux builds with easy GUI design and native apps. Custom UI easily done also, and you'd then have one code base for all three platforms. You can download and use the software for free to develop and test, only requires a license once you decide to build your app.
You can also conside Livecode
Livecode: http://livecode.com
For any platform except web, it is opensource and it includes mobile targets as well, if your code is flexible enough to not being C# or Java.
An option is to build the core logic in a compiled library using C# and GUI independence and then plug it to livecode, leaving the UI work for that tool.
"GTK# uses different libraries for each platforms", do you mean different rendering back ends (such as X11, Cairo)?
You only need to build your GTK# app once. However, you do have to bundle the GTK# runtime (which is different for Windows and Mac) with your app. Banshee is a good example you can follow.
Probably your best bet is to use Nevron Open Vision. It is a cross-platform, C# based User Interface Platform, that implements most of the controls you need to build enterprise-ready applications. It is the framework behind MyDraw (www.mydraw.com) - a professional drawing program similar to Visio. MyDraw is built completely with Nevron Open Vision and does not require any other third-party libraries. We mainly develop it under Windows and just compile it to Mac. Soon we are going to add support for Linux and WebAssembly hosts.
Microsoft just launched .NET MAUI, a cross-platform GUI framework that builds on Xamarian.forms.
As we consider what building device applications will look like in a unified .NET, we see many devices across multiple platforms used, from Android and iOS to Windows and macOS. To address this need we are excited to announce a new first-class UI framework for doing just that: .NET Multi-platform App UI, affectionately call .NET MAUI.
This seems to meet all of your requirements. They do not explicitly mention Linux in their article, but claim to support it in the description on the Github Repo.
It depends on the audience of the app: Consumer mass market or business/IT
If its mass market consumer facing
Electron or native UI, perhaps with shared non-UI code. Visual Studio Code was made with Electron, for example (last I checked). Google Flutter is a new entrant worth evaluating. Dropbox is Python (or used to be). It is a lot of work (a) getting Python packaged properly for smooth x-platform install, and (b) GUI work will take a long time. Sadly, for mass market consumer apps (not utilities for IT people but beautiful designs for the masses like Dropbox, Skype) you will be spending a ton of time getting the installation system to work and getting the app to look and feel appropriate. This is an extremely time consuming endeavour no matter what path you take.
Consumer: Java? I don't think Java is a great fit for consumer desktop although I could be wrong. There are some Java packaging systems that are leaner/all bundled in. I'd also say JVM software companies tend to go under (more on this later). FreeMind the free mind mapper, is a good example of what can be achieved in Java.
Consumer: .NET? Yes, for the Windows side. Then use something native for Mac and shared libraries for non-GUI code. There is ".NET Core" aka Mono but its not fully matured at this time for Mac. Mono has been around for over half a decade and I haven't seen it mature for a consumer app. Ask: How many .NET Core apps are in the Mac app store? I hope it gets better but as of this writing (2020) there's very few notable ones.
Business app or IT tool
If its a basic business app or utility where a basic UI is okay, I'd evaluate Xojo and/or LiveCode mainly for comparison sake. Xojo is fairly close to .NET. Google Flutter as well since it's up and coming. By the time you read this, Flutter may be the best choice.
B2B: Java? This is a pretty tried, tested and true solution for "heavy" enterprise apps. You might not have end-users love you given Java apps tend to eat up memory. But for enterprisey apps the main concern is that the very intense business logic will work. For IT tools, it depends. If it's a 3-screen utility program, avoid Java. If it's a complex ERP then Java is good. Remember to look around for different packaging tools to avoid consumer headaches with the JVM. Again, one Java desktop app I like is Freemind. It's a great example of making a reasonable desktop app in Java. I have used it in both Windows and Mac and it's great. You can also look at Kotlin or Groovy (for test cases) which compile to Java byte code.
B2B .NET? There is so much to unpack here. The key is, in my biased view, .NET Windows desktop development is about 2X-4X faster development time than Windows Java desktop development. From making the GUI, to better code completion, to faster compile times, to less packaging and install snags. That said, at the time of this writing the ".NET Core" or Mono are pretty thin for MacOS. I really, really hope this changes. But I've been waiting years for Mono or .NET Core to provide a full suite for MacOS without the limitations and it hasn't yet happened. If it's an enterprise app, you might be able to get away with using .NET Core for Mac. But please first build a basic .NET Core "hello world" app with all the control/libraries you want to use. Then try building an installer for it on MacOS, and find someone random with a Mac to see if it actually installs and runs. You may find you're struggling in this area today (although I hope it gets better, it hasn't for years).
Overall Notes on Cross Platform
If this is a smaller app which doesn't need a fantastic UX and super-deep OS integration, then I'd consider Xojo or LiveCode, perhaps for the UX elements. Like #merlucin said, you can write the core logic in something shared- perhaps C#, python, etc.
Here's why- Xojo and LiveCode have been around for 10 years now. They are more about keeping things consistent. Whereas I find .NET and QT changes all the time. You have a lot of costs of keeping up with the Joneses and maintaining installers. So for a small app or utility- an XML editor, IT helper tool, Xojo or perhaps LiveCode will help you get there sooner.
When you hit the build button on Xojo, for example, it literally makes 3 executable files for Windows, Mac and Linux. Compare that to the madness of packaging a cross platform Python app, or even packaging a .NET app for Windows, to be honest.
The tradeoff is these tools- Xojo and LiveCode often end to be missing a few critical things you need, requiring a bit of a hack. You can read around their forums. Xojo is a bit like .NET although LiveCode is a different programming paradigm entirely based on "stacks".
Keep in mind developer happiness too. Many developers wont want to code in Xojo or LiveCode because they are lesser known languages. So ensure you get buy-in. What happens if you get laid off and have 5 years of experience in Xojo? Hmm.
In your evaluation, no matter what you choose-- you must compile a basic GUI app in the platform you're evaluating and get 3 people to install it correctly on a Mac. You'll be shocked at the libraries and madness needed. Especially if you're a web developer, you'd see that just maintaining installers is a ton of work across 3 platforms. Never mind GUI consistency.
If anybody having the solution of advantages and limitations of using mono project to run C# Code on Linux, Please tell me your thoughts...
There's a huge advantage - it works. You can use C#, develop, and run on Linux (and other platforms, including Windows).
The disadvantage is that things don't always work the same way as they do in MS's .NET implementation, and there is some functionality that is not implemented at all, such as WPF.
Advantages
Investment - when you choose right software you don't have to pay for software licences when running Mono on Linux (this doesn't mean that it's free - Linux is only free if your time has no value).
No vendor lock-in - you have more choices for other software on Linux (for example DB or Web servers) when compared to MS solutions which works best with other MS stuff.
Mono specific libraries (for example Mono.Simd or REPL).
Open source (you, or others, can fix bugs/provide patches/improve code by yourself).
Limitations
Incompatibility with MS.NET framework.
In general you will probably spent more time with certain things (for example dealing with incompatibility or learning Linux administration and such).
Mono is not up-to-date with new API and features for some time when new version of .NET framework is released.
I have developed a few apps in C# and have tried to get a few running on Linux via Mono. Getting console applications to run in pretty simple. Most of the time, there is no code change needed to get these types of applications running under Mono. However, GUI applications are always more tricky. The first thing you should know is that your user interface will not blend in with the user's theme. The application will always look like a Windows 98 application, assuming you are using Microsoft's System.Windows.Forms.
If, however, you plan to write and run the application only on Linux, then you could use Mono's Gtk# to build the user interface. This integrates with Linux desktops much better than System.Windows.Forms. This page gives a good rundown of the different GUI toolkits, their pros, and their cons.
If you are sticking with System.Windows.Forms for the GUI toolkit in order to run your application on both Windows and Linux, keep in mind that even though Mono supports C# 4.0, you are better off keeping yourself limited to C# 2.0, as some of the features of 3.0 and up aren't implemented or do not work well on Linux.
I want to learn C# because... It seems to be a pretty marketable language these days. More than C, not so much as PHP/MySQL in my area, but I'd rather be a software developer than a web developer. Anyways, I'm running linux, and I have no hope of working on a windows platform until I buy a new computer. So, are there any drawbacks to learning C# under linux? If so, are there any good lessons online for doing such a thing? Any good tutorials online for learning C# in general?
update
so what I'm getting is that the main drawback is that although the full C# language spec is implemented in mono, the full .Net framework isn't. But, until I can get a new system and run windows, I guess lacking the full framework will have to do.
The language spec is fully implemented but the framework itself is not. So learning C# the language will be no different (ignoring the benefits of using visual studio as your IDE). Writing against the framework will be a bit different.
edit> It also depends on what kind of programming you intend to do. Much of the parts of mono that aren't complete are also often edge cases for beginners that you aren't likely to run into. So if you're just learning C#, there's a very good chance that you won't come across the parts of the framework that haven't been implemented yet (and I mean yet, they are very fast at updating mono from what I've seen so far, so by the time you're ready to really explore the framework and all that it entails, there's a good chance that it might be completed by then)
learning C# on linux may actually be good, when you start doing it on windows, you will know both. The IDE will not be as modern, but I'll bet there are not many people that can do it on both.
You'll be able to concentrate on the actual C# language and you can learn the microsoft IDE when you get to use C# on windows.
The major drawbacks that I see are:
The latest .NET versions are not supported
Different tools between Mono and Visual Studio
In spite of that, I think you can learn a lot about C# on Mono.
Any good tutorials online for learning C# in general?
Here's a tutorial I wrote:
http://www.csharp-station.com/Tutorial.aspx
Feedback has indicated that all of the code in the tutorial runs fine on Mono.
Joe
Learning the language should not hurt, I would not depend on it to land you a job. However, keep in mind that many of the runtime services that are accessed via C# may not be available. Knowledge of those services is perhaps just as, if not more, important the language itself.
The main problem with C# on Linux is that your development system will not be as good, in most people's estimation. But you may get really good at vi(1)...
On MonoDevelop you won't have all the newest features of the .NET framework, it's somewhere between 2.0 and 3.5.
It supports C#3.0 though.
Mono is gaining traction very, very quickly. I've heard rumblings that MS is silently supporting Mono (see their approach with getting SL to run on Linux). In some cases, mono actually outperforms .net on a windows based server.
The downside would be the IDE and features, as many have already mentioned. Visual Studio is by far the best IDE out there.
It does support Asp.Net MVC IIRC though.
Mono overcomes the single biggest drawback to using .NET from Microsoft for many developers, the requirement to run on the Windows platform. By bringing the shared source release of the .NET Framework to multiple platforms and then building an open source project around extending it, The Mono Project has made the strengths of .NET available to a wide range of developers. The ability to develop using a variety of languages, all using a common interface and deployable on a number of platforms is a very compelling development strategy.
As far as the web services aspects of Mono are concerned, nearly all of the Framework is complete meaning a developer can begin developing web services today using Mono. Mono features nearly complete implementations of ASP.NET, ADO.NET and Web Forms, along with almost all of the SYSTEM namespace. For more a detailed visit mono's official site,mono-project.com check out these articles on Cool Solutions for Developers:
Well there is nothing wrong if we learn something & probably we might end up improving it which will be more useful to the future users.Probably that is the power of open source.I think all developers will agree to this point :)
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
In looking at the use of C# in a ISV setting, I'm wondering what prominent C# based desktop apps are out there? I can think of only Paint .NET.
Is C# a good idea for an ISV, or should one stick to more native environments like Delphi or even QT?
Of course any experienced based advise or feedback would be appreciated.
Yes, C# can be used quite effectivly to build applications. In regards what applciations are out there, what are you looking for? Big apps, little apps?
I know of a big app that is built on the .NET framework (unsure if C# or VB) and that is Quickbooks.
Developing a Desktop applications in C# is great. Its not just for Web Apps.
WinForms are going to save you huge amounts of time. It really is a first class citizen when it comes to desktop windows development. If interop is a problem you can always use P/Invoke and COM object wrapping that VS does for you.
Done right, it will be a breeze to maintain and update when the client changes their mind on what they want.
Yes, the framework needs to be on the machine, But this shouldn't be a problem if they have ever used windows update. Nowadays what language doesn't come with a run time library. In VS you can create simple installers that include the runtime.
Of course if your gonna deploy to Linux and mono, your mileage may very.
PlasticSCM
If you can control the system requirements for your application, C# is fine. Some end users still (even though we're nearly in 2009 now) object to a 40MB runtime for some reason, so if you're looking to deploy an application commercially, that may be an issue for you. In a corporate setting, though, where there is some standardization of software on users' computers, this is probably not a problem.
Delphi and QT specifically are both problems. Delphi is effectively a dead language. Companies that are using it these days are, for the most part, porting their code away from it as fast as they can (job boards seem to be full of Delphi-to-C# migration jobs these days). You may like QT, but that moves almost as slowly as Delphi in the Windows world, so I would never consider it to be a real option.
More:
Business Plan Pro
Rescue Time client
Sony Vegas
Sql Management Studio
VS 2010 (much more so than VS 200x)
NASA's World Wind
BabySmash
Windows Live Writer
Microsoft Office Accounting
Fiddler 2
Windows Mobile Device Center
AdiIRC
Jetbrains dotTrace
Lots of Lenovo utilities
Planbook
These are just the ones installed on my PC...
I think that Microsoft Expression Blend/Studio is written in C#
Anything done for Robotics Studio, any XNA game (quite a few commerical ones are coming out now)
I don't see why you would not use C# as an ISV. The problem is ensuring that your target market has the .NET framework. If you are using 3.5, you can build a mini version into your distribution though this increases the file sizes for downloads of course.
Some supplemental information to think about:
One of the typical points against doing desktop applications the distribution model is a lot more difficult to manage. With web apps, if you have a large user base, you can do an update and instantly have your entire user base running on the latest version.
With traditional desktop apps, you'd have to send out an .msi or build something yourself.
However, with ClickOnce and the Updater Application Block (http://msdn.microsoft.com/en-us/library/ms978574.aspx), it's so easy to build intelligent updating into your application that it might play very nicely into an ISV plan.
Even though VS 2008/WPF is shrinking the gap, it's typically much faster to develop client applications in the WinForms space that on the web, so I think it's a very viable approach.
I believe TimeSnapper is written in C#
I have worked for an ISV before that used Delphi and it was excellent for their needs. It still produces great native applications and although dieing it is certainly not dead (yet). Until recently I would have recommened Delphi over c# for desktop applications as I had performance and footprint consderations but as .net can now be considered ubiquitous and that the platform is now maturing my opinoin would probably go with c# (over Delphi).
If you need to consider employees, you will find that there are fewer Delphi developers around that c# ones. So you may struggle to entice good devleopers in as you are using that.
That said Delphi is looking exciting again with the Delphi prism VS plugin.
Just as an aside did you know that the c# compiler is written in c++? Delphi was written in Delphi from v1.0
Windows Media Centre is powered by .NET.
I believe that MS use C# to build many of their apps both Windows and Web. At this time, C# is a great language to go with because of the flexibility of the language/framework.
The zune software (v2 and up) is written in c#. Oh, and Sage Timberline Office is written in .net (mostly).
Although it's a developer tool, the excellent open source IDE SharpDevelop was built in C#. I've also worked on another which (despite being semi-commercially-available) I'm not at liberty to divulge. (Very vertical market.)
I'm a huge fan of the C#/WinForms combination, and can't see why you wouldn't go that route if your developers are already familiar with C# and you want to get into the desktop space.
A very prominent example for a commercialy successful application would be Microsoft Visual Studio 2005 itself.
If you are looking into building a client or server application for the Windows ecosystem .Net with C# is an absolut valid choice. You'll get a very rich framework, a great third-party-app ecosystem and a huge community.
If you need a minimal memory footprint for your application or are very hardware centric then C++ maybe an option.
If you want to target the UNIX/LINUX or Apple platforms you should be looking in frameworks more native for the respective platform, though you can get a certain degree of interoperability with the Mono project (But I am not up to date on how complete their implementation of .Net currently is).
I believe the matrox graphics card configuration utilities are using the .net-framework.
I'm still just a student, but for what it's worth (and from other answers preceding mine), there seem to be quite a few apps in C#.
I'd advise working through the book Head First C# (Amazon link). This book will give you a pretty solid idea of what you can do with the language.
=-MDP-=
Creative Docs .NET is a very nice example of C# application.
Microsoft's World Wide Telescope software is written in c#
Who are your target users? Their needs will dictate your choice of language. C# and VB.NET are good general purpose langs, but if you are targeting Mac or *nix, you may want something like C++.
If you're looking for a way to get started quickly, I recently published DesktopBootstrap, which is my attempt to factor out the elements you'll need to get started.
Hope that helps!
I have an app that I've written in C#/WinForms (my little app). To make it cross-platform, I'm thinking of redoing it in Adobe AIR. Are there any arguments in favor of WinForms as a cross-platform app? Is there a cross-platform future for Winforms (e.g., Mono, etc.)? Suggestions for cross-platform UI development?
By cross-platform I mean, currently, Mac OSX, Windows and Linux.
This question was asked again and answered with better success.
As far as my experience in Flex/AIR/Flash actionscripting goes, Adobe AIR development environment and coding/debugging toolsets are far inferior to the Visual Studio and .NET SDK as of the moment. The UI toolsets are superior though.
But as you already have a working C# code, porting it to ActionScript might requires a redesign due to ActionScript having a different way of thinking/programming, they use different primitive data types, for example, they use just a Number instead of int float double etc. and the debugging tools are quiet lacking compared to VS IMO.
And I heard that Mono's GtkSharp is quiet a decent platform.
But if you don't mind the coding/debugging tooling problems, then AIR is a great platform. I like how Adobe integrates the Flash experience into it e.g. you can start an installation of AIR application via a button click in a flash movieclip, that kind of integration.
I'm thinking of redoing it in Adobe AIR
Not having spent much time with AIR, my personal opinion is that it is best for bringing a webapp to the desktop and provide a shell to it or run your existing flash/flex project on the desktop.
Btw, if you don't know ActionScript, I mean its details, quirks, etc, don't forget to factor in the time it will take googling for answers.
Are there any arguments in favor of WinForms as a cross-platform app?
Is there a cross-platform future for Winforms (e.g., Mono, etc.)?
It's always hard to predict what will happen, but there is at least one project (Plastic SCM) I know of which uses Mono Winforms on Win, Mac and Linux, so it is certainly doable. However, they say they built most of their controls from the ground up (and claim they want to release them as open source, but not sure if or when), so you will need to put in some work to make things look "pretty".
I played with Winforms on non-windows platforms and unfortunately, it isn't exactly "mature" (especially on Mac). So what you get out of the box may or may not be sufficient for your needs.
If you decide a desktop app is not the best way to provide a cross-platform solution, you can always take your business logic written in C# and create either a full-blown webapp with ASP.NET or go with Silverlight, so many other options exist with C#.
WinForms are fully supported by Mono, so they are cross-platform.
Why would you go with Air?
Use GTK#, and you have a cross platform forms engine and you get to keep your C# code.
Well I think the only way to for cross-platform reliably with C# is Microsoft Silverlight, but is not really WinForms, and browser-based. Other than that, yes Mono is a chance.
If you want to use the .net Framework, Microsoft Silverlight is a good (the only?) choice. The browser does a good job as a shell, but you could also write your own application shell for it. For example, Scott Handelman mentions the NY Times Reader written in Silverlight and hostet on Cocoa on a Mac.
I don't think there is a future for WinForms at all. Since it appears to have been a stop-gap solution even in MSFT world ( a very thin wrapper around Win32). And virtually no changes seem to have been made to System.Windows.Forms in both .NET 3.0 and 3.5
</speculation>
I would use Java or Air.
I think that as long as you make sure that the business logic code you write is cross-platform (i.e. using backslashes in paths only works on Windows - forward slashes works on all OS's), then Mono shouldn't have major problems running an unmodified WinForms program. Just make sure you test for graphical glitches.
I asked a similar question last week. I've been using Mono all along, and have had no issues running the applications I compile to IL to run on SuSE linux (I usually run KDE) or windows, however, I've not gone out and got a mac yet to test it on. I will be soon, though, probably with in a couple weeks. But all and all development in Mono has been very good at creating application that will run on multiple platforms.