<p>I have an app that I've written in C#/WinForms (<a href="http://www.thekbase.com" rel="nofollow noreferrer" title="TheKBase">my little app</a>). 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?</p>

<p>By cross-platform I mean, currently, Mac OSX, Windows and Linux.</p>

<p>This question was <a href="https://stackoverflow.com/questions/116468/winforms-for-mono-on-mac-linux-and-pc-redux">asked again and answered with better success</a>.</p>

[{'answer_id': 72604, 'author': 'Łukasz Sowa', 'author_id': 347616, 'author_profile': 'https://Stackoverflow.com/users/347616', 'pm_score': 2, 'selected': False, 'text': '<p>WinForms are fully supported by Mono, so they are cross-platform.</p>\n'}, {'answer_id': 72610, 'author': 'Michael Pliskin', 'author_id': 9777, 'author_profile': 'https://Stackoverflow.com/users/9777', 'pm_score': 1, 'selected': False, 'text': '<p>Well I think the only way to for cross-platform reliably with C# is <a href="http://www.silverlight.net" rel="nofollow noreferrer">Microsoft Silverlight</a>, but is not really WinForms, and browser-based. Other than that, yes Mono is a chance.</p>\n'}, {'answer_id': 72632, 'author': 'Paul van Brenk', 'author_id': 1837197, 'author_profile': 'https://Stackoverflow.com/users/1837197', 'pm_score': 0, 'selected': False, 'text': "<p>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</p>\n\n<pre><code>&lt;/speculation&gt;\n</code></pre>\n\n<p>I would use Java or Air.</p>\n"}, {'answer_id': 72633, 'author': 'chakrit', 'author_id': 3055, 'author_profile': 'https://Stackoverflow.com/users/3055', 'pm_score': 3, 'selected': False, 'text': '<p>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.</p>\n\n<p>But as <em>you already have a working C# code</em>, 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 <code>Number</code> instead of <code>int float double</code> etc. and the debugging tools are quiet lacking compared to VS IMO.</p>\n\n<p>And I heard that <a href="http://www.mono-project.com/GtkSharp" rel="nofollow noreferrer">Mono\'s GtkSharp</a> is quiet a decent platform.</p>\n\n<p>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.</p>\n'}, {'answer_id': 72970, 'author': 'Thomas Danecker', 'author_id': 9632, 'author_profile': 'https://Stackoverflow.com/users/9632', 'pm_score': 1, 'selected': False, 'text': '<p>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 <a href="http://www.hanselman.com/blog/default.aspx?date=2008-09-05" rel="nofollow noreferrer">mentions</a> the NY Times Reader written in Silverlight and hostet on Cocoa on a Mac.</p>\n'}, {'answer_id': 72982, 'author': 'FlySwat', 'author_id': 1965, 'author_profile': 'https://Stackoverflow.com/users/1965', 'pm_score': 2, 'selected': False, 'text': '<p>Why would you go with Air?</p>\n\n<p>Use <a href="http://www.mono-project.com/GtkSharp" rel="nofollow noreferrer">GTK#</a>, and you have a cross platform forms engine and you get to keep your C# code.</p>\n'}, {'answer_id': 219351, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>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.</p>\n"}, {'answer_id': 219361, 'author': 'stephenbayer', 'author_id': 18893, 'author_profile': 'https://Stackoverflow.com/users/18893', 'pm_score': 0, 'selected': False, 'text': "<p>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. </p>\n"}, {'answer_id': 385653, 'author': 'Emrah Diril', 'author_id': 30581, 'author_profile': 'https://Stackoverflow.com/users/30581', 'pm_score': 3, 'selected': True, 'text': '<blockquote>\n  <p>I\'m thinking of redoing it in Adobe AIR</p>\n</blockquote>\n\n<p>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. </p>\n\n<p>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.</p>\n\n<blockquote>\n  <p>Are there any arguments in favor of WinForms as a cross-platform app? \n  Is there a cross-platform future for Winforms (e.g., Mono, etc.)?</p>\n</blockquote>\n\n<p>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". </p>\n\n<p>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.</p>\n\n<p>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#.</p>\n'}]
['https://Stackoverflow.com/questions/72580', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8047/']