WebPartDisplayModeEventHandler 委托

定义

表示将处理 WebPartManager 对象的 DisplayModeChanged 事件的方法。Represents the method that will handle the DisplayModeChanged event of a WebPartManager object.

public delegate void WebPartDisplayModeEventHandler(System::Object ^ sender, WebPartDisplayModeEventArgs ^ e);
public delegate void WebPartDisplayModeEventHandler(object sender, WebPartDisplayModeEventArgs e);
type WebPartDisplayModeEventHandler = delegate of obj * WebPartDisplayModeEventArgs -> unit
Public Delegate Sub WebPartDisplayModeEventHandler(sender As Object, e As WebPartDisplayModeEventArgs)

参数

sender
Object

事件源。The source of the event.

e
WebPartDisplayModeEventArgs

包含事件数据的 WebPartDisplayModeEventArgsA WebPartDisplayModeEventArgs that contains the event data.

继承
WebPartDisplayModeEventHandler

注解

引发WebPartDisplayModeEventHandler 事件DisplayModeChanged时, 将调用委托中指定的方法。The method specified in the WebPartDisplayModeEventHandler delegate will be called when a DisplayModeChanged event is raised.

页面开发人员可以通过将OnDisplayModeChanged属性添加到页面中的<asp:webpartmanager>元素, 并为属性分配自定义方法名称, 为 Web 部件事件提供自定义处理程序。Page developers can provide custom handlers for Web Part events by adding an OnDisplayModeChanged attribute to the <asp:webpartmanager> element in a page, and assigning a custom method name to the attribute. 还可以通过编程方式分配自定义处理程序。A custom handler can also be assigned programmatically. 有关如何订阅事件的详细信息, 请参阅如何:引发和使用事件For more information about how to subscribe to an event, see How to: Raise and Consume Events.

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate.

适用于