C
C#3d ago
Faker

Resource to learn making GUI in C#

Hello guys, is there any recommended resource to start making GUI from scratch in C# please
22 Replies
Buddy
Buddy3d ago
Define from scratch Like win32 API from scratch or ..?
Faker
FakerOP3d ago
euh, like for beginners
Faker
FakerOP3d ago
Noted, will have a look, ty !!
Buddy
Buddy3d ago
for WPF, avoid using toolbox and Drag 'n drop If you want drag n drop, use Windows Forms, which is ancient and not that performant (or nice looking). If you want to have a more modern UI but slightly harder, go with WPF if you want windows-only, and Avalonia if you want cross-platform.
Faker
FakerOP3d ago
Alright, will just get started with the WPF since it's more modern... by the way, is there a reason why we should avoid the drag and drop for WPF? I read that GUI in C# was drag and drop, so in my head it was just going to be something relatively quick to learn, but this might not be the case? :c
Buddy
Buddy3d ago
Updated the message to list all of them The designer for WPF sets Margin as an absolute position which is the spacing between elements. Imagine you set an absolute position of a control and resized said app. The control will remain at the same coordinate no matter what, which means your say .. Button will be off-screen. Layout controls is vital for those apps. You use layout controls in Windows Forms too, but there you use Visual Studio's inspector, the toolbox, and the designer to design your app. Windows Forms was designed with drag n drop in mind while it seems WPF was not. Avalonia is almost exactly the same as WPF but different with its styling of controls.
Faker
FakerOP3d ago
yep I see. Last question, should I learn Windows Forms before WPF or I can just get started with WPF (or it depends on what I want, like legacy systems etc...)? It's just to become more familiar with GUI (I like GUIs but don't know how to make them :c)
Buddy
Buddy3d ago
Windows Forms is not similar at all to WPF If you just want to make a fast app with no care in the world for its UI then winforms if you want to make a good looking app Windows-Only - WPF Cross-Platform - Avalonia
Faker
FakerOP3d ago
Yep noted, will get started with WPF, and then if needed will learn winforms, thanks !
Unknown User
Unknown User3d ago
Message Not Public
Sign In & Join Server To View
Buddy
Buddy3d ago
I totally forgot about that
Unknown User
Unknown User3d ago
Message Not Public
Sign In & Join Server To View
Buddy
Buddy3d ago
Does WinUI even have docs?
Unknown User
Unknown User3d ago
Message Not Public
Sign In & Join Server To View
Buddy
Buddy3d ago
Their "docs" really don't seem beginner friendly. (as always)
Unknown User
Unknown User3d ago
Message Not Public
Sign In & Join Server To View
Buddy
Buddy3d ago
Never personally used WinUI, so got no recommendation on that front
Unknown User
Unknown User3d ago
Message Not Public
Sign In & Join Server To View
sibber
sibber3d ago
i recommend starting with WPF because of the amount of online resources once you understand the basics well you can switch to a modern framework what thing is that
Unknown User
Unknown User3d ago
Message Not Public
Sign In & Join Server To View
sibber
sibber3d ago
oh

Did you find this page helpful?