I am going to create a WPF application. So far, in uni, the only way we have ever run the GUI is to have one main window with one code file to handle button clicks, etc.
My problem is that as the application grows, the GUI grows, and the size of the code behind the file can really get out of hand!
I have identified about 15 main use cases for my system (example: enter data, details, etc.). I create a main window (size: 480x320) consisting of 15 separate screens (one for each use case). This can be achieved with a centered and stretched TabControl with 15 TabItem. Or, most likely, it could be a bunch of multilayer containers, one on top of the other (only one visible at a time).
The fact is that with 15 separate screens my code file will become huge (not to mention the xaml file!): Juggling between states - creating 14 crumbling / hidden and creating one visible, Managing controls for 15 different screens.
Is there a way to have 15 separate forms, each with its own code file, instead of 15 TabItems in one form, and then have one main engine that creates and replaces them as needed? Of course, it should look like it's one shape, not 15 pop-ups.
How can I handle this? How do you solve the problem with xaml and code-behind files with a length of thousands of lines?
Mikey source
share