SetProperties


New a form1.
Drag a SetProperties control from toolbox into the form1.
new a class to set the properties for SetProperties, for example "AxisLimits.cs"

In AxisLimits.cs, write as:
 [Description("Sets the maximum limit for the X axis."),
                Category("Axes"), DefaultValue(5)]
        public float XMax
        {
            get { return xMax; }
            set { xMax = value; }
        }
.....

Write following code in form1.
   private AxisLimits al;  // This command will define a private variable al, this al
                                  //  variable has the characteristic of Class AxisLimits.
        private form1()
       {
          initialization...
          a1 = new AxisLimits();
       }
        private void AxisLimitSettings()
        {
         Applicationdata.ListXMax.Add(al.XMax);
         }
原文地址:https://www.cnblogs.com/greencolor/p/1565043.html