This is a question that involves style more than anything. I’m looking for ideas that will help me solve a common GUI design problem. The application is done in Winforms and would have rather WPF, the application is already complete but being quite the perfectionist and when working with other people I decided there must be a better way of solving this problem.
How do you encapsulate controls with a set of functionalities? Considering that there may be multiple columns of the same functionality lets say we have the below custom air plane system. This allows flight coordinators to assign certain flight staff to each flight. They might not be interested in all the airplanes of the entire fleet so they have the ability to choose the airplane that they want to view before choosing the staff that are assigned or if there are already assigned staff then it will pre-populate the staff cells.
The current way we have implemented this problem is by using a button for each cell, although this means we have to encapsulate each column with numerous buttons within a class. Each column is represented by a class called “AirplaneCrew” and makes up each assigned staff and the current airplane this handles the data for these columns. Attached to each AirplaneCrew is a AirplaneCrewGUI which encapsulates the column of buttons and then will generate the GUI accordingly. To understand it better I have provided a simple UML, it’s probably not perfect but this is where I lack an understanding of how to intertwine classes with the GUI. If anyone has a book or can provide a summary of how to achieve better practise when working with GUI elements.


Both MVVM and MVP separate the view (UI) from the logic.
The DataBinding in WPF allows for the creation of Templates that ‘generate’ UI based on the data that needs to be presented.
I expect that these two things are missing from (or are causing a lot of pain in) the current design.
A flexible UI requires a clear separation of concerns so you know where to change the system when new requirements need to be met and when you do not want to do all the adjustments by hand you will need some logic (runtime or designtime) that will generate the system automatically based on configuration and/or meta data.
If the current technology does not support these two features you will need to create those (a lot of work), get them from someone else or switch to a different technology.