4

I'm familiar with creating websites in ASP.NET MVC using C#. But I never learned how to create desktop applications with C#. So I wanted to look a bit more into this. I got the back-end pretty much covered since I'm experienced with ASP.NET. But I have no idea when it comes to front-end development. I'm guessing Microsoft offers several approaches to create desktop applications (forms, MVC, ...) Just like java offers different packages. But when I open visual studio, all I see is the possibility to create a Windows Form application.

  1. What possibilities do there exist for creating Windows Desktop applications in C# (Windows forms, mvc?)
  2. Which is considered "thebest"/"most widespread"?
  3. Any recommended tutorials, guides or free e-books?
  4. Any other advice is always welcome.
Reinard
  • 3,624
  • 10
  • 43
  • 61
  • 1
    Take a look at Windows Presentation Foundation – dmck Apr 04 '12 at 14:04
  • 1
    I would go for windows forms since that's the easiest one to start with. It's also possible to do it with the (xml like) WPF for better and fancier graphical desktop applications. – Memet Olsen Apr 04 '12 at 14:06

4 Answers4

6

If you're using Visual Studio, which most people do, it's a bit of a hard choice.

WinForms are great for quick projects which don't require too much customisability of the design in things like borders, backgrounds, due to it using Microsoft's pretty old forms (They've been visually revamped a lot and obviously adjusted) they have a lot of limitations (Such as no padding on things like text fields), but they still look nice and are nice if you just want a regular application with a clean UI.

If you want a dynamic one which is easier to adjust and much more customisable, and also separates design from code using XAML, you definitely want WPF. Sadly you'll need to put in a decent amount of time to learn XAML fluently.

So to sum up, if you want a quick project that looks nice, and you don't want to learn XAML, WinForms If you want to spend a little longer to make it more visually attractive and customisable (Mostly on the coding end, not the end user's), it's got to be WPF.

Another advantage of WPF is that, like I said, it separates design and code, so you could collaborate with a designer at some point on the future. There's also hard-coded WPF as far as I know, but most people use XAML.

Also, I've never looked this up, but I'd give a good guess it's much easier to get a job with experience in WPF as opposed to WinForms in a professional environment due to the design/code seperation

Ashley Davies
  • 1,873
  • 1
  • 23
  • 42
  • What about startup times? Last time I used WPF (many years ago), I had worse startup times compared to win forms. Even after checking [this](https://stackoverflow.com/questions/868841/what-makes-wpf-application-startup-slow) – Artur Carvalho Mar 05 '19 at 17:46
4

I recommend WPF over WinForms, and there, MVVM pattern suits best.

WPF is more modern, powerful and flexible than WinForms, which is not technically obsolete, but not as promising (similarly to WebForms perhaps). XAML skills will be useful for Silverlight as well as Metro apps development.

As for WPF / MVVM resources - tons of it on the internet. For one, have a look at Prism framework

Comparing the MVC and MVVM patterns along with their respective ViewModels - also a good read.

Konrad Morawski
  • 8,307
  • 7
  • 53
  • 91
2

I would advocate the opposite. WPF has a hell of a lot to learn compared to WinForms. By all means progress to the former once you've mastered the latter. Also, get Adam Nathan's book 'Windows Presentation Foundation Unleashed' as this will help smooth your path.

deadlyvices
  • 873
  • 6
  • 18
0
  1. Yes, winform, wpf are used, ms's mvc is not, it is a pattern for ms's web applications
  2. Yes, Trolling helps most
  3. Yes, google tutorials as I do it for most of the time. I learn asp.net from http://asp.net site
Sesama Sesame
  • 279
  • 3
  • 6
  • 19