Share this post

Link to post

Share on other sites

There are an enormous number of options, really just about anything you can imagine.

On one extreme, you can build custom controls for each piece, then use those controls into bigger custom controls, and put those into other custom controls, until you have put together your entire window.

On another extreme, you can build the entire layout and custom draw everything in one pass in a single section of code.

Somewhere in the middle you can build individual panels and have them respond to events.

There are many GUI-builders that can help you out, including the built-in system in Visual Studio.

There really isn't one single answer to what is "professional". What is best in one situation may be terrible in another situation.

Share this post

Link to post

Share on other sites

You're asking for help implementing a GUI layout you haven't decided on for a task we know nothing about. No one can possibly give you a meaningful answer to that (other than "we don't know").

Think about your users:
Who are they? Are they likely to be experts in their domain or novices? What is their likely familiarity with computers? Do you have one group of users or many (i.e. Some experts, some novices)?

What tasks are they trying to achieve with your software? What information does it need to convey? What is commonly used and must be easily accessible? What is potentially harmful and must be guarded against?

All these questions should lead you into a UX design. Draw it out on paper or in a software tool. Ask people to pretend they're using it and see how they respond.

Share this post

Link to post

Share on other sites

I mainly use WinForms. In WinForms if I wanted to do this I would probably use multiple UserControls to use the designer interface more easily. UserControls can also be instantiated on the fly which allows you to create multiple instances of the same page if you ever need to. Creating UserControls on the fly and removing them once they're done being used also lets you make sure you never leave a page in a bad state like you might do with tab pages.

Share this post

Link to post

Share on other sites

My problem is not how to design the GUI on paper. I have decided pretty much how my GUI will be.

Honestly, it really doesn't sound like you have.

The problem I have right now is how to best handle the "pages" of my program (NOT in design, but programming wise inside Visual Studio).

"Pages" is not really a term used in desktop UI design (outside of Tab pages). It's much more of a web term. Desktop terms tend to be dialogs or forms.

For example when I press a button I want to get redirected to another "page" of the application. How should I implement that?
Should I redirect the user to another form? should I change the panel? should I use user control?

This is easy to do, but once again, it still sounds like you're unsure of your design. That's fine, nothing wrong with prototyping to see what works, but you need to think about your design in terms of process. Can your user do more than one thing at a time? Do you understand the concept of modal vs modeless dialogs?Do you want an MDI environment?

I want you to recommend me a basic easy way to manage and maintain those pages.
When I say easily manage I mean so that I can clearly see from the design view what the UI looks like.

Is there some reason you can't use the standard winforms designer in Visual Studio?

Share this post

Link to post

Share on other sites

I would really appreciate if you could recommend me any tutorial where I can learn more about user controls.

For the most part, you can think of UserControl as if it was halfway between a control like a Label/TextBox and a Form.

- You add them to an existing form or inside a panel or other container control.- They don't have any of the Form-specific things like resizable border controls or minimize/maximize/close buttons.- You can use the Forms Designer to put multiple controls inside them just like you can with a Form and set up tabbing, anchoring, docking, etc with the child controls.- Each UserControl is a separate class, so you can encapsulate their members or expose them if you want, similar to how there's many different ways you can pass data between two Forms. Choose whatever works best for you.

You can Google search for "WinForms C# UserControl tutorial" for more in-depth tutorials.

For your specific case, what you would want to do is make your UserControls, and then have your form create them and then set userControlInstance.Dock = DockStyle.Fill; to make the user control automatically fill the entire form. Then design each UserControl so that the controls nested inside of it are anchored or docked properly within the UserControl.

To do inter-page navigation, have each UserControl's navigation buttons raise an event for your Form to handle, and have the Form switch between pages. You can encapsulate these events or expose the navigation buttons directly, depending on what your personal maintainability/rapid development biases are.
Edited November 11, 2015 by Nypyren