I am doing a small 'Windows Forms' project. I have a situation where I have a few user controls.
Suppose the controls are:
UC_a, UC_b, UC_d, UC_e.... etc.
Now, I have a splitContainer and some radiobuttons in my main app window.
I want to load the user controls into the panel1 of spliContainer.
I do not want to add them all at once. Rather, it goes like this:
First, the user has to select one of the radio buttons.
Depending on this selection, the user controls get loaded.
Suppose the user has selected radiobutton1.
Now what i want is to first load UC_a.
Suppose UC_a contains a combobox and a checkbox. The user now has to select one value from the combobox and then check the checkbox. Only once the user has done these 2 actions must the main app load the next user control. Suppose UC_b is the next user control that has to be added to the splitcontainer.panel1.
UC_b may need the value that was selected by the user in UC_a and so, if UC_b is loaded prior to the user selecting the values in UC_a, it will throw error.
Now, some of these controls maybe loaded multiple times, ie, say, after UC_a is loaded, and the user has provided the necessary inputs, 5 or 10 separate instances of UC_b maybe created and added to the panel.
say, each UC_b has a checkbox and The user needs to select any 3 of these UC_b controls by checking their respective checkboxes. Once 3 UC_b has been selected, load UC_c and so on...
My question is: How do I make the main app wait for the user input in these user controls before continuing?