public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object component, Attribute[] attributes) { if (context.PropertyDescriptor is RemapPropertyDescriptor) { RemapPropertyDescriptor remapDescriptor = context.PropertyDescriptor as RemapPropertyDescriptor; if (remapDescriptor.Name == "CurrentApplication") { PropertyDescriptorCollection realProperties = DescriptorUtils.GetStaticProperties(typeof(Application)); PropertyDescriptorCollection remappedProperties = DescriptorUtils.RemapComponent(realProperties, component, null, null, new ChildTypeConverter()); return(remappedProperties); } else { PropertyDescriptorCollection realProperties = ReadProperties(null, component, attributes, component, null); return(realProperties); } } else { if (cachedComponentInfo != component) { cachedApplicationInfo = new ApplicationInfo(); cachedComponentInfo = component; } PropertyDescriptorCollection result = ReadProperties(context, component, attributes, cachedApplicationInfo, null); //PropertyDescriptorCollection appProps = PropertyDescriptorUtils.GetStaticProperties(typeof(Application)); //result = PropertyDescriptorUtils.MergeProperties(result, appProps); return(result); } //temp = ReadProperties(context, component, attributes, cachedApplicationInfo.CurrentPrincipal, "CurrentPrincipal"); //result = PropertyDescriptorUtils.MergeProperties(result, temp); //temp = ReadProperties(context, component, attributes, cachedApplicationInfo.CurrentPrincipal.Identity, "CurrentIdentity"); //result = PropertyDescriptorUtils.MergeProperties(result, temp); //temp = ReadProperties(context, component, attributes, cachedApplicationInfo.CurrentPrincipal, "CurrentPrincipal"); //result = PropertyDescriptorUtils.MergeProperties(result, temp); //temp = ReadProperties(context, component, attributes, cachedApplicationInfo.CurrentThread, "CurrentThread"); //result = PropertyDescriptorUtils.MergeProperties(result, temp); //temp = ReadProperties(context, component, attributes, cachedApplicationInfo.CurrentProcess, "CurrentProcess"); //result = PropertyDescriptorUtils.MergeProperties(result, temp); }