Flexible Forms in Visual Studio C#

danhodge

In Runtime
Messages
324
Location
UK
Hey guys, I've decided on a new project to do over summer, but I've hit a roadblock in my planning.
Basically, I want to make a program that lets me really easily budget for my next year, with a really simple output. I made my parents a spreadsheet in excel a while ago and it went straight over their heads, so I'm basically aiming to make a much easier to understand version of that, that they could use.

Before I jump into the programming, I want to get the layout sorted, but my problem with visual studio forms is that I've no idea how to make their positioning dynamic without some really awkward, long winded programming.

And I remember that in the Unity game engine, their new GUI had options to have a panel of a fixed size, that could contain a variable amount of values inside it, which would shift down if something new was added, or possibly resize to fill it, etc (for things like scoreboards).

So, my question is, does a feature like this exist in Visual Studio?

If you need an example, here is my extremely shoddy mockup of how I want it to look. What I want, is for the user to be able to add more outgoings, that would add the the queue under the current ones, then push the horizontal line and everything under it down. Can this be done using the form controls that I don't understand whatsoever, or will this require programming?

https://drive.google.com/open?id=0B_kWB6wmciFRZ3locUlsalM2Z3c

Thanks for the help,
Danny
 
First question would be...are you planning on using Winforms or WPF? Or even a web app?
 
I hadn't even considered it, winforms is all I know right now, is it worth me looking into wpf? A quick search says its the newer, arguably better alternative...
But as of right now, it's winforms :)
 
Yes, I would definitely suggest learning WPF over using Winforms if you can (or want to learn something new even). Data binding IMO is a much better architecture.
 
Well this project is for me to keep learning new things, so why not, i'll give it a go. So to go back to the original post, can i do this in WPF? :)
 
Yes; WPF uses XAML for it's forms, which is similar to HTML/web in regards to you can declare your controls with relative positions. You use a "grid" layout in WPF/XAML, and you put everything into rows/columns, and can tell the controls to be relative distances from each other and be dynamic dimensions.

Check out a fairly easily-done application I did in WPF:
https://github.com/carnageX/ChecksumVerifierWPF

https://github.com/carnageX/ChecksumVerifierWPF/blob/master/ChecksumVerifier/MainWindow.xaml
 
Back
Top Bottom