c# 重写控件怎么定义像Font、Size等那样可以展开的属性

c# 重写控件如何定义像Font、Size等那样可以展开的属性?
像Font、Size等属性那样可以展开然后里面可以设置很多子属性
------解决方案--------------------
引用:
Quote: 引用:

这个Font是个类 
重写的控件里加个:
public 自定义类名 Object1; 
然后你那那个控件.Object1.里就那个自定义类的所有属性了

也可以用结构体struct

结构体和类我都试过了不行啊,你说的加个冒号是啥意思,加哪?能写俩代码不

 struct demo1
    {
        public int num;
        public string name;
        public void fortry()
        {
            this.num = 0;
        }
    }

    public class demo2
    {
        public string name;
        public int length;
        public Byte[] bytes;
        public demo2()
        {

        }
        public demo2(string filename)
        {
            name = filename;
            FileStream fs = new FileStream(filename, FileMode.Open);
            try
            {
                BinaryReader r = new BinaryReader(fs);
                r.BaseStream.Seek(0, SeekOrigin.Begin);
                bytes = new Byte[(int)r.BaseStream.Length];
                length = (int)r.BaseStream.Length;
                bytes = r.ReadBytes((int)r.BaseStream.Length);
            }
            catch
            {
            }
        }
    }

    public class myButton : System.Windows.Forms.Button
    {
        public demo1 struct1;
        public demo2 class2;
    }

差不多就是这样了:
c# 重写控件怎么定义像Font、Size等那样可以展开的属性