using System.Collections.Generic; using System.ComponentModel; namespace Mesnac.Controls.Feeding { public class StringListConverterParent : TypeConverter { public override bool GetStandardValuesSupported( ITypeDescriptorContext context ) { return true; // display drop } public override bool GetStandardValuesExclusive( ITypeDescriptorContext context ) { return true; // drop-down vs combo } public override TypeConverter.StandardValuesCollection GetStandardValues( ITypeDescriptorContext context ) { List list=new List(); foreach ( Component cmpnt in context.Container.Components ) { list.Add( cmpnt.Site.Name ); } return new TypeConverter.StandardValuesCollection( list ); } } }