Home > Net >  C # will form with empty control information is stored in XML format
C # will form with empty control information is stored in XML format

Time:09-27

For a story winform procedure through to save form and the properties of the controls have been XML ~ after using the XML will draw the forms and controls and to display the form and control ~

CodePudding user response:

What you said is not WPF

CodePudding user response:

Serialization and deserialization

CodePudding user response:

On the 14th floor, https://bbs.csdn.net/topics/392721136 needs to change, the 15 floor serialization
With mainly by the attribute of the
Public static void ForeachClassProperties Model (T)
{
The Type t=model. GetType ();
PropertyInfo [] PropertyList=t.G etProperties ();
Foreach (PropertyInfo item in PropertyList)
{
ControlAttributes. Add (new ControlAttribute (item Name, item. The GetValue (model, null)));
}
}
  •  Tags:  
  • C#
  • Related