ContentDesigner.PreFilterEvents(IDictionary) 方法

定义

当在派生类中被重写时,允许设计器将项添加到它通过 TypeDescriptor 对象公开的事件集中。When overridden in a derived class, allows a designer to add items to the set of events that it exposes through a TypeDescriptor object.

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

参数

events
IDictionary

EventDescriptor 对象,它表示组件的类的事件。The EventDescriptor objects that represent the events of the class of the component. 事件字典中的关键字是事件名。The keys in the dictionary of events are event names.

注解

此方法提供了一种方法,用于向设计器通过 TypeDescriptor公开的事件字典中添加项。This method provides a way to add items to the dictionary of events that a designer exposes through a TypeDescriptor.

事件字典中的键是事件的名称。The keys in the dictionary of events are the names of the events. 对象的类型为 EventDescriptorThe objects are of type EventDescriptor.

在此重写的方法中,设计器将清除此控件的所有事件。In this overridden method, the designer clears all events for this control.

继承者说明

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

适用于

另请参阅