C# WPF or Windows Forms?

  • (2 Pages)
  • +
  • 1
  • 2

22 Replies - 1866 Views - Last Post: 20 February 2017 - 04:59 PM

#1 Bonekit  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 71
  • Joined: 09-May 16

C# WPF or Windows Forms?

Posted 01 December 2016 - 03:06 AM

Hello Folks,

IŽll start learning C#.
I installed Visual Studio RC 2017 and found for windows desktop two project templates "WPF" and "Windows Forms".
So what is the difference?
And which one should i use, when i like to develope desktop apps?

Regards
Tobias
Is This A Good Question/Topic? 1
  • +

Replies To: C# WPF or Windows Forms?

#2 Michael26  Icon User is offline

  • Futurama: Insert funny joke here
  • member icon

Reputation: 414
  • View blog
  • Posts: 1,664
  • Joined: 08-April 09

Re: C# WPF or Windows Forms?

Posted 01 December 2016 - 05:17 AM

Both are a form of presenting UI to the user, but WinForms have been around much longer than WPF and are a bit out of date regarding the UI.
So if this your first time and haven't decided yet, let me make it easy for you, go with the WPF. It is more robust and has better support for more modern UI elements
Was This Post Helpful? 3
  • +
  • -

#3 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6505
  • View blog
  • Posts: 14,362
  • Joined: 02-June 10

Re: C# WPF or Windows Forms?

Posted 01 December 2016 - 08:21 AM

See my signature block - there is a link about how WinForms is end-of-life.

Michael26 is right - Go with WPF - Or Xamarin if you want to jump into mobile and cross-platform development. Nice thing about Xamarin is its basically WPF that can run on Mac, Windows, Android, etc.
Was This Post Helpful? 3
  • +
  • -

#4 hexagod  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 242
  • Joined: 29-October 16

Re: C# WPF or Windows Forms?

Posted 15 February 2017 - 04:55 PM

I'll have to check out WPF then, I've been using windows forms since the software I code is expected to be run in Windows.. however.. I'd love to see what other GUI options are available. I use Xamarin for mobile; but the layout designer is REALLY choppy and laggy compared to winforms... is it the same way with WPF? I just find that winforms flows so nicely (in the layout designer and exe) and it runs extremely fast for all of my appplications, which is why I haven't changed over yet.
Was This Post Helpful? 0
  • +
  • -

#5 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6505
  • View blog
  • Posts: 14,362
  • Joined: 02-June 10

Re: C# WPF or Windows Forms?

Posted 15 February 2017 - 05:05 PM

Since that 2.5 month old post, I have started a blog for developing in Xamarin.
http://www.RedPillXamarin.com

It kind of makes sense that if you're going to go XAML/MVVM/C# you might as well be able to deploy on Windows, Mac, iOS, Android and Tizen for the same amount of effort.

> but the layout designer is

"Layout Designer" ??? Oh... You're doing a platform specific mobile app? Not a cross-platform Xamarin.Forms app?

Everything I do is Xamarin.Forms so the single code base is used across all platforms. No 'designer' there. Then again, I don't know any developers for WPF or Xamarin that use a designer. Everyone I know that does this professionally just writes markup.
Was This Post Helpful? 0
  • +
  • -

#6 JapanDave  Icon User is offline

  • D.I.C Regular

Reputation: 29
  • View blog
  • Posts: 365
  • Joined: 01-February 16

Re: C# WPF or Windows Forms?

Posted 16 February 2017 - 08:45 PM

I started to learn C# from last year, I was told to learn WPF over win forms and I can you now, I am so glad I did. Win forms is the easy way to get a UI up and running with relative little knowledge in programming which is probably why many people gravitate toward it. But WPF is so much better in many ways.

It will take a little longer, but it is worth the effort in going with WPF.
Was This Post Helpful? 1
  • +
  • -

#7 hexagod  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 242
  • Joined: 29-October 16

Re: C# WPF or Windows Forms?

Posted 17 February 2017 - 10:53 AM

OK OK ... after I get these projects in Winform done I'm going to start learning WPF. Before I google it.. anyone know a good resource for getting started in WPF?
Was This Post Helpful? 0
  • +
  • -

#8 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6505
  • View blog
  • Posts: 14,362
  • Joined: 02-June 10

Re: C# WPF or Windows Forms?

Posted 17 February 2017 - 01:11 PM

My two cents worth...

In the same way WPF supplanted WinForms, Xamarin is now doing the same to WPF. Its not done, its happening. Meaning while its still a bit rocky, you could be on the forward edge of the learning curve instead of the back end.

If you are at all interested in having your apps run on Windows, and Mac, UWP, iOS and Android... all from a single C# & XAML code base then go to Xamarin. Its basically the next gen of WPF. They are both XAML/C#/MVVM implementations. Only Xamarin will let your app run on your PC desktop, iPhone and Samsung tablet, Tizen wearable or refrigerator for that matter. With Mac desktop support coming out soon or next build I think.

It just sort of makes sense to take that 5,000 hours you're about to consume to learn XAML and apply it to 4-5 platforms instead of one. And its all built in to Visual Studio, just like WPF is.

Take a look at my tutorial blog. If you don't like it, then WPF is still there for ya. Same only different.
http://www.RedPillXamarin.com

This post has been edited by tlhIn`toq: 17 February 2017 - 01:14 PM

Was This Post Helpful? 1
  • +
  • -

#9 hexagod  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 242
  • Joined: 29-October 16

Re: C# WPF or Windows Forms?

Posted 17 February 2017 - 02:54 PM

Very good! Thanks for the info man. I have been using Xamarin for about a month or two coding some lightweight mobile apps.. I'll have to try it out for making windows programs aswell. Appreciate the help. Also, what templates do you recommend getting started with, if any?
Was This Post Helpful? 0
  • +
  • -

#10 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6505
  • View blog
  • Posts: 14,362
  • Joined: 02-June 10

Re: C# WPF or Windows Forms?

Posted 17 February 2017 - 04:10 PM

Templates?
Was This Post Helpful? 0
  • +
  • -

#11 hexagod  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 242
  • Joined: 29-October 16

Re: C# WPF or Windows Forms?

Posted 17 February 2017 - 04:29 PM

Yeah I can't find any for Windows/Xamarin... I see create new WPF project in visual C# but no Xamarin windows.. how can I make a windows app in Xamarin?

EDIT: Hey yah nevermind I just remembered you said I'd have to write my markup in XML, I'm going to wait I guess... I don't really want to write my GUI code.. I'd rather use visual arrangers to write the code for me. Maybe I should stick with WPF

This post has been edited by hexagod: 17 February 2017 - 04:32 PM

Was This Post Helpful? 0
  • +
  • -

#12 Michael26  Icon User is offline

  • Futurama: Insert funny joke here
  • member icon

Reputation: 414
  • View blog
  • Posts: 1,664
  • Joined: 08-April 09

Re: C# WPF or Windows Forms?

Posted 17 February 2017 - 05:06 PM

I think you would have more control if you write your own, i never like visual arrangers, or drag and drop in Visual studio or code generators
Was This Post Helpful? 0
  • +
  • -

#13 hexagod  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 242
  • Joined: 29-October 16

Re: C# WPF or Windows Forms?

Posted 17 February 2017 - 05:26 PM

oh man... I'm making a WPF app right now... this is XAML.... NOOOOOOOOOOOOOOOO :gun_bandana:
Was This Post Helpful? 0
  • +
  • -

#14 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 5830
  • View blog
  • Posts: 19,870
  • Joined: 05-May 12

Re: C# WPF or Windows Forms?

Posted 17 February 2017 - 09:02 PM

If you've ever done (modern) web UI development, you don't use a designer. FrontPage is so 1990's with its tables and absolute positioning. With modern web development, you use markup and styles. The same approach applies to WPF/Xamarin when using XAML.
Was This Post Helpful? 1
  • +
  • -

#15 JapanDave  Icon User is offline

  • D.I.C Regular

Reputation: 29
  • View blog
  • Posts: 365
  • Joined: 01-February 16

Re: C# WPF or Windows Forms?

Posted 18 February 2017 - 02:13 AM

View Posthexagod, on 17 February 2017 - 05:26 PM, said:

oh man... I'm making a WPF app right now... this is XAML.... NOOOOOOOOOOOOOOOO :gun_bandana:/>

Honestly, it won't take you that long to be able to get a small app up and running, just staick at it.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2