ControlDesigner.PreFilterProperties(IDictionary) 方法

定义

在设计时向设计宿主中的“属性”网格添加属性或从中移除属性,或提供可能与关联控件上的属性相对应的新设计时属性。Adds properties to or removes properties from the Properties grid in a design host at design time or provides new design-time properties that might correspond to properties on the associated control.

protected:
 override void PreFilterProperties(System::Collections::IDictionary ^ properties);
protected override void PreFilterProperties (System.Collections.IDictionary properties);
override this.PreFilterProperties : System.Collections.IDictionary -> unit
Protected Overrides Sub PreFilterProperties (properties As IDictionary)

参数

properties
IDictionary

组件的类的特性。The properties for the class of the component.

注解

使用 PreFilterProperties 方法,你可以向控件设计器通过 TypeDescriptor 对象公开的属性字典中添加项。With the PreFilterProperties method, you can add items to the dictionary of properties that a control designer exposes through a TypeDescriptor object.

属性字典中的键是属性的名称。The keys in the dictionary of properties are the names of the properties. 对象的类型为 PropertyDescriptorThe objects are of type PropertyDescriptor.

继承者说明

可以直接修改可通过 properties 参数访问的字典,也可以将其保持不变。You can directly modify the dictionary that is accessible through the properties parameter, or you can leave it unchanged. 如果重写 PreFilterProperties(IDictionary) 方法,请在执行您自己的筛选之前调用基实现。If you override the PreFilterProperties(IDictionary) method, call the base implementation before you perform your own filtering.

适用于

另请参阅