void AssignPropertiesFromResources (ControlBuilder builder, Type controlType, string attvalue)
{
// Process all public fields and properties of the control. We don't use GetMembers to make the code
// faster
FieldInfo [] fields = controlType.GetFields (
BindingFlags.Instance | BindingFlags.Static |
BindingFlags.Public | BindingFlags.FlattenHierarchy);
PropertyInfo [] properties = controlType.GetProperties (
BindingFlags.Instance | BindingFlags.Static |
BindingFlags.Public | BindingFlags.FlattenHierarchy);
foreach (FieldInfo fi in fields)
AssignPropertyFromResources (builder, fi, attvalue);
foreach (PropertyInfo pi in properties)
AssignPropertyFromResources (builder, pi, attvalue);
}