ControlPropertyNameConverter.GetStandardValues(ITypeDescriptorContext) 方法
定义
与格式上下文一起提供时,在实现 IDesignerHost 的设计器中返回控件的属性名集合。Returns a collection of property names for the control within a designer that implements IDesignerHost when provided with a format context.
public:
override System::ComponentModel::TypeConverter::StandardValuesCollection ^ GetStandardValues(System::ComponentModel::ITypeDescriptorContext ^ context);
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues (System.ComponentModel.ITypeDescriptorContext context);
override this.GetStandardValues : System.ComponentModel.ITypeDescriptorContext -> System.ComponentModel.TypeConverter.StandardValuesCollection
Public Overrides Function GetStandardValues (context As ITypeDescriptorContext) As TypeConverter.StandardValuesCollection
参数
- context
- ITypeDescriptorContext
提供格式上下文的 ITypeDescriptorContext,可用来提取有关从中调用此转换器的环境的附加信息。An ITypeDescriptorContext that provides a format context that can be used to extract additional information about the environment from which this converter is invoked. 此参数或其属性可以为 null。This parameter or properties of this parameter can be null.
返回
TypeConverter.StandardValuesCollection,包含表示当前控件的属性名的一组字符串。A TypeConverter.StandardValuesCollection that contains a set of strings representing property names for the current control. 如果当前控件为 null,则返回一个空集合。If the current control is null, an empty collection is returned. 如果 context 参数为 null,则返回 null。If the context parameter is null, null is returned.
注解
GetStandardValues方法返回一个 TypeConverter.StandardValuesCollection 集合,该集合包含一组表示当前控件的属性名称的字符串。The GetStandardValues method returns a TypeConverter.StandardValuesCollection collection that contains a set of strings representing the names of the current control's properties.
使用 context 参数来提取有关从中调用此转换器的设计时环境的其他信息。Use the context parameter to extract additional information about the design-time environment from which this converter is invoked. 此参数可以为 null ,并且上下文对象上的属性可以返回 null 。This parameter can be null, and properties on the context object can return null. 如果 context 参数为 null ,则此方法返回 null 。If the context parameter is null, this method returns null.