I've got a form that resides in a tab control. The user can create many of these forms and each time they open a new tab. One ability that we've given the user is the ability to "Dock" and "Undock" the form from the tab control. I am looking for a way to transfer the data from when the form goes from being Docked to Undocked (or vise versa). Basically in code, all I'm doing is creating a new instance of the same form but with a border and some other properties set if they choose undock. I know I can do the standard:
But I have close to 30 controls that the user could have input on and was looking for a better way. I was thinking of looping through each control on the form but again, there are controls within controls, within controls (a group control houses another tab control which hold a gridview, etc.).
Thoughts/ideas as to how I can do this?
Code:
frmUndocked.txtName.Test = frmDocked.txtName.Text
etc.
But I have close to 30 controls that the user could have input on and was looking for a better way. I was thinking of looping through each control on the form but again, there are controls within controls, within controls (a group control houses another tab control which hold a gridview, etc.).
Thoughts/ideas as to how I can do this?