Code Red > .NET

WPF or Windows Forms

(1/1)

Augusto:
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:
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.

gile:
Hi,

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

themethodman:
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:
Hi,


--- Quote from: huiz on January 08, 2021, 01:20:57 PM ---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.

--- End quote ---

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


--- Quote from: gile on January 09, 2021, 05:01:01 AM ---You can have a look to this modest contribution about user interfaces with AutoCAD .NET.

--- End quote ---

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


--- Quote from: themethodman 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.

--- End quote ---

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.

Navigation

[0] Message Index

Go to full version