更新时间:2023-01-01 10:01:32
调整菜谱:
TypeDescriptionProvider
TypeDescriptor.AddProvider $ C $加C>
ITypedList
TypeDescriptor.AddProvider
ITypedList
的TypeConverter
的PropertyGrid
,这也是用来获取元数据的机制;注意, ExpandableObjectConverter
只是委托给 TypeDescriptor.GetProperties
,但这并非总是如此PropertyGrid
, this is also the mechanism used to obtain metadata; note that ExpandableObjectConverter
simply delegates to TypeDescriptor.GetProperties
, but this is not always the case UITypeEditor的
的PropertyGrid $ C画预览框中$ C>
PropertyGrid
其他:
IExtenderProvider
- 追加的性能;这可能是你感到困惑什么用 TypeDescriptionProvider
ITypedList
- 广泛 ICustomTypeDescriptor
的双胞胎,但对于名单;可以通过使用 TypeDescriptionProvider
,并在任何一个非对象索引来避免的IList
,即公共ŧ这个[INT指数] {获得;}
IListSource
- 一个数据 - 之间提供间接源和数据;例如,数据表
工具 IListSource
,返回默认视图
时要求IExtenderProvider
- appends properties; this may be what you were getting confused with TypeDescriptionProvider
ITypedList
- broadly the twin of ICustomTypeDescriptor
, but for lists; can be avoided by use of TypeDescriptionProvider
and a non-object indexer on any IList
, i.e. public T this[int index] {get;}
IListSource
- provides indirection between a data-source and the data; for example, a DataTable
implements IListSource
, returning DefaultView
when requested