An visual component of a Form.
        public static void AddElement(this Form form, string name, Control element, string initialValue = null, bool isValueRequired = false)
        {
            if (form == null) throw new ArgumentNullException("form");
            if (name == null) throw new ArgumentNullException("name");
            if (element == null) throw new ArgumentNullException("element");
            if (form.Elements.Any(e => e.Name.Equals(name, StringComparison.OrdinalIgnoreCase)))
                throw new InvalidOperationException("The form already contains an element '" + name + "'");

            form.Elements.Add(new FormElement(name, element, isValueRequired));
            form.Values.Add(name, initialValue);
        }
 public FormElement(string name, Control control, bool isValueRequired = false)
 {
     Name = name;
     Control = control;
     IsValueRequired = isValueRequired;
 }