I have been working on an application which allows the user to make a label template for printing purposes by adding label controls to a panel(which I use as a container). I have reached the point where I need to be able to save the template to a file which I can load into memory later for printing. Since the form is not serializable does anyone have suggestions on how I can save the form or container(with added label controls) to a file that can be reused later?
Thanks.
Create a struct that contains enough information (and no more) about each
Labelthat you can reconstitute theLabelfrom it.Write a method that takes a
List<MyStruct>and populates aPanelfrom your structs.Write methods to serialize and deserialize this list.
Encapsulate the whole thing in a class.