Simple and advanced layout

I am currently developing a C # application that will have two layouts: simple and advanced.

A simple layout will have 4 objects (2 buttons and 2 text controls), and an expanded layout will contain 8 objects.

What would be the best way to do this? Having two forms? Or, set the button.visible parameter to true / false (and for each object?).

+4
source share
2 answers

If you follow a user interface template that allows you to separate the model, view and controller (for example, MVVM or MVC), you will find that it is very simple to have two separate forms that can be developed over time as needed, with minimal changes to the rest of your code.

Trying to do the work in one form for two different presentations tends to become complicated over time (compared to the alternative, just create two forms that use the same model and controller) as user requirements develop.

UPDATE

Based on your comment ... you can also do MVC using WinForms

http://www.codeproject.com/Articles/383153/The-Model-View-Controller-MVC-Pattern-with-Csharp

+2
source

I would suggest the third option, having two user controls that have the same shape. Then all you have to do is install a visible user control. And you get the opportunity to share any code between them.

+1
source

Source: https://habr.com/ru/post/1443020/


All Articles