Save WinForm or Controls to File

后端 未结 6 1975
旧巷少年郎
旧巷少年郎 2021-01-24 09:52

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 ha

6条回答
  •  一整个雨季
    2021-01-24 10:39

    1. Create a struct that contains enough information (and no more) about each Label that you can reconstitute the Label from it.

    2. Write a method that takes a List and populates a Panel from your structs.

    3. Write methods to serialize and deserialize this list.

    4. Encapsulate the whole thing in a class.

提交回复
热议问题