❔ Visual Studio Help
I am making an app using Windows Form, is there a way to copy the layout of one of my forms and re use it? I want to keep the layout consistent.
19 Replies
yes
first off though... I just want to mention that Windows Forms is an old framework and you should really only use it for educational purposes. I woudln't not recommend attempting to make a legit app in it nowadays as there are better options
---
that being said...
you just need to make "UserControls"
you can define your own user controls and then re-use as much as you want
when you make a user control, it will appear as an item in the "Tool Box" pane in Visual Studio and you can add it to any form just like any other UI element
What would be a more modern and efficient option?
what kind of application are you trying to make? that is really the determining factor
if possible... try to make web apps rather than desktop apps
if it must be a desktop app, then either WPF, Avalonia, Maui... there are multiple options
Why are web apps more favourable?
I wouldn't really say they're more favorable
certainly more trendy
if you're going for monetization, a web app is arguably better, as you can better counter piracy
however, it's also arguably more work to maintain
I am just making a little side project nothing complex
I am a beginner
prolly just go with WPF
Avalonia gets you cross-platform desktop support
MAUI gets you cross-platform mobile support
WinUI gets you Windows Mobile/Store support
if all you're looking for is Windows Desktop, WPF is still your best bet
Alright then I will go with WPF
Thank you so much
somewhat unfortunately
how so?
even WPF is old now
oh haha
about 15 years, IIRC
there's a lot of things that newer frameworks like Avalonia or MAUI do better
that they've improved upon
Avalonia though is a third-party project and just doesn't have the same first-class tooling that WPF does
not yet
and MAUI is still relatively new, and thus also lacking tooling, and is also kind of a pain in the ass
same for WinUI
You lost me lmao
Would WPF be the simplest option?
don't worry about it then
I am not looking for anything advanced
just a basic app
WPF
just giving some extra context
feel free to ignore
No no I am grateful, thank you so much 🙂 I will use WPF
Thanks again
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.