Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><em>Your question is a little unclear, but</em></p> <p>If you require saving/loading of the <strong>Form Layout</strong> have a look at</p> <p><a href="http://www.codeproject.com/KB/cs/UserSettings.aspx" rel="nofollow noreferrer">Windows Forms User Settings in C#</a></p> <p>If you require saving/loading an <strong>object/class</strong> have a look at</p> <p><a href="http://www.codeproject.com/KB/XML/xml_serializationasp.aspx" rel="nofollow noreferrer">Load and save objects to XML using serialization</a></p> <p><strong>EDIT:</strong></p> <p>This will show you how to persist certain settings for form properties.</p> <p><a href="http://www.c-sharpcorner.com/UploadFile/dolson/SaveandRestoreSetingsofa.NETFormusingXML11252005230324PM/SaveandRestoreSetingsofa.NETFormusingXML.aspx" rel="nofollow noreferrer">Save and Restore Setings of a .NET Form using XML</a></p> <p>Also have a look at <a href="http://www.codeproject.com/KB/cs/aal-5a.aspx" rel="nofollow noreferrer">The Application Automation Layer - Using XML To Dynamically Generate GUI Elements--Forms And Controls</a></p> <p>All these will guide you in the direction you need to go.</p> <p>I think the main objective here is</p> <ul> <li>Figure out when to save and when to load, and where to store/retrieve these settings.</li> <li>Are you storing these settings per user? In a database? In a xml file?</li> <li>Next you need to identify which properties you will be saving/restoring per control. Simple location/size settings might not cut it as controls will have various complexities (Button, TextBox, Gridview, ListView)</li> <li>Now you need to figure out how to iterate ALL controls on the form. Buttons, Textboxes, Panels, Controls in Controls (controls in panels), and maybe even your User Controls. This can be done using recursion.</li> <li>Now you need to decide on the structure of the xml file (if you opt to use xml). This should pretty much look like a tree structure, as you would look at the form, and its controls, and their controls, as a tree structure.</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload