public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(string) && value is DPVerticeCollection) { DPVerticeCollection col = value as DPVerticeCollection; int count = col.Count; return(String.Format("个数:{0}", count)); } return(base.ConvertTo(context, culture, value, destinationType)); }
public DPVerticeCollectionPropertyDescriptor(DPVerticeCollection coll, int idx) : base("#" + idx.ToString(), null) { this.collection = coll; this.index = idx; }