What is the difference between GTK# and Windows Forms?

后端 未结 4 749
清酒与你
清酒与你 2021-02-14 09:17

What is the difference between GTK# and windows forms? Are they totally different?

Thanks

4条回答
  •  再見小時候
    2021-02-14 09:41

    They are both GUI toolkits, each having their strength and weaknesses. From my experience:

    • Winforms does not require installation on windows, Gtk# does require installation on Windows.
    • Winforms has a designer in Visual Studio, Gtk# has standalone designer and integrated designed in MonoDevelop.
    • Winforms is bound to Windows, Gtk# is cross-platform.
    • Winforms is slow and flickers. Gtk is faster.
    • Most Winforms controls are wrappers around standard windows controls and offer very limited functionality. Gtk widgets are more feature-rich.
    • Gtk allows creating forms and widgets with complex layout. Winforms offers only trivial variants of layout, and FlowLayout & TableLayout & AutoSize are too weak to be able to have complex forms that resize and automatically accomodate to different font sizes, different resolutions.
    • Cairo is faster and has more features than Gdi+ (Cairo supports output and input from more types of files, e.g., svg, pdf)
    • Gtk# is open-source, winforms is not
    • Winforms and Gtk# have 3rd-party controls/widgets (however, with Gtk# there is less need for them because basic controls work really good).

    In short, I would not recommend using Winforms (except when there is a strong reason not to have more dependencies than .NET FW), but using Gtk# or WPF.

提交回复
热议问题