Author Topic: WPF or Windows Forms  (Read 2148 times)

0 Members and 1 Guest are viewing this topic.

Augusto

  • Newt
  • Posts: 75
WPF or Windows Forms
« on: January 08, 2021, 06:15:57 AM »
Assuming your application needs forms and palettes, what do you consider best for development, WPF or Windows Forms?

I'm still giving my first steps in C#, doing some tests. If possible I would like to know your point of view on these technologies as pros and cons, reasons to use or not.

In addition, I have other doubts regarding the behavior of these components in different environments, such as a computer whose font scale is different from 100%.

Looking at this example on the Kean website, I could see that it creates and changes a palette referencing Windows Forms components.
https://www.keanw.com/2015/09/creating-an-autocad-palette-dynamically-to-launch-commands-and-methods-tagged-using-net.html

huiz

  • Swamp Rat
  • Posts: 913
  • Certified Prof C3D
Re: WPF or Windows Forms
« Reply #1 on: January 08, 2021, 01:20:57 PM »
Winforms is a bit easier and if you scale the form with DPI instead of Font, it will scale not really bad on 4K.


WPF is a b*tch and you'll start to hate it real quickly but it is a much better choice. I will never return to WinForms. You can do so many great things when you have more experience.
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: WPF or Windows Forms
« Reply #2 on: January 09, 2021, 05:01:01 AM »
Hi,

You can have a look to this modest contribution about user interfaces with AutoCAD .NET.
Speaking English as a French Frog

themethodman

  • Mosquito
  • Posts: 12
Re: WPF or Windows Forms
« Reply #3 on: January 10, 2021, 05:38:57 PM »
I've used winforms in the past due to its simplicity.

My user interfaces aren't complicated so I followed the keep-it-simple-stupid approach.

They also fit nicely in with most of autocads own user interface menus as well.

Augusto

  • Newt
  • Posts: 75
Re: WPF or Windows Forms
« Reply #4 on: January 13, 2021, 09:37:20 AM »
Hi,

WPF is a b*tch and you'll start to hate it real quickly but it is a much better choice. I will never return to WinForms. You can do so many great things when you have more experience.

Thinking about avoiding problems in my first project, I will consider using WPF in the next time.

You can have a look to this modest contribution about user interfaces with AutoCAD .NET.

Excellent tutorial!
I will definitely revisit it in the future.
Thank you for sharing your knowledge.

I've used winforms in the past due to its simplicity.
My user interfaces aren't complicated so I followed the keep-it-simple-stupid approach.
They also fit nicely in with most of autocads own user interface menus as well.

Even though I know that WPF increases the possibilities of personalization, I will use Windows Forms because I am used to its use in applications outside of autoCAD.
I believe that this way my performance will be better initially. I hope I'm not mistaken.

Thank you all for the answers.