WinForms vs. WPF (again)

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

32 Replies - 12665 Views - Last Post: 10 April 2017 - 03:36 PM

#31 JapanDave  Icon User is offline

  • D.I.C Regular

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

Re: WinForms vs. WPF (again)

Posted 30 March 2017 - 07:00 AM

Well, I want to weigh in on this discussion. When I first posted here, I posted a question about WinForms code (I had just started to learn C# about a week earlier) problem and immediately was told by tlhIn`toq to forget it and move to WPF. To be honest, I had never workedg in .net or web applications , so XAML was really an issue of me never even knowing that this type of UI code existed. But I persisted , since then I have made a few apps in C#/WPF and I am just about to complete my first true app done all in MVVM. Safe to say, I am so glad tlhIn`toq told me to forget WinForms, as I haven't looked back.

Now , as to those who think WinForms is easier. Just for fun I played around with a small project to see what WinForms was like and honestly, I actually found WPF easier (Or should I say more efficient), as you can get around using code behind to assign behaviors etc, for controls with rather simple XAML.

So, my opinion is that the people pushing WPF or Xamarin, really do have a point, there is a bit of a learning curve, but take it from someone who had no experience in XAML and the fact that I was over 40 years old when I wrote my first WPF application, that it should not be too difficult for someone who already knows C# and WinForms.

Edit: It was actually SkyDiver and tlhIn`toq who got me onto WPF and Xamarin.

This post has been edited by JapanDave: 30 March 2017 - 06:17 PM

Was This Post Helpful? 1
  • +
  • -

#32 GazinAtCode  Icon User is offline

  • D.I.C Head

Reputation: 25
  • View blog
  • Posts: 95
  • Joined: 26-September 16

Re: WinForms vs. WPF (again)

Posted 10 April 2017 - 12:05 PM

I've been using C# for image processing for a while now, and it seems that you can do much more with the older classes such as Bitmap, ColorMatrix, and other stuff from System.Drawing/System.Drawing.Imaging. With WPF, you are sort of forced to switch over to BitmapSource and everything that goes with it... if you don't want to keep converting between Bitmap and BitmapSource, of course.

Not sure if this is an advantage, but it's still pretty easy to get Windows Forms to work with C++/CLI (including the drag-and-drop editor). But XAML and C++/CLI? I don't think that's possible.
Was This Post Helpful? 0
  • +
  • -

#33 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6507
  • View blog
  • Posts: 14,377
  • Joined: 02-June 10

Re: WinForms vs. WPF (again)

Posted 10 April 2017 - 03:36 PM

The C# hasn't changed. Nothing has been taken away. So all that work that you did before is 100% usable now.

So... To respond in general terms to general statement...

Do all your work and be done with it. Then update the property for the ItemSource when you're done, and all your UI updates.

To be fair I did a complete real-time green-screen capture app, pulling the live feed from a Canon SLR, replacing all the chromakey, and doing editing in real-time in WPF. There were two displays: One for the operator and one for the big-screen that the crowd/audience would see. Picture one of the mall "Your face on a Magazine cover" photo systems.

The operator screen had all the tools and palette while the bigscreen had a second WPF window with just the working "canvas". Both were binded to the same ViewModel. Both updated in real time as the single target bitmap was being changed. No micromanagement of tracking two screens etc. Additionally the operator can switch between two different cameras in different 'stages' so a helper can get group 'a' situated while the artist works group 'b'... back and forth...

Last I knew that system is used in about 20 locations throughout Las Vegas handling dozens of customers an hour. So I know WPF can handle that kind of work, and workload, well.

I'm sure its just a case of needing to get familiar with the paradigm shift from WinForms to MVVM.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3