DetailsView.OnModeChanged(EventArgs) Method


引发 ModeChanged 事件。Raises the ModeChanged event.

 virtual void OnModeChanged(EventArgs ^ e);
protected virtual void OnModeChanged (EventArgs e);
abstract member OnModeChanged : EventArgs -> unit
override this.OnModeChanged : EventArgs -> unit
Protected Overridable Sub OnModeChanged (e As EventArgs)



包含事件数据的 EventArgsAn EventArgs that contains the event data.


DetailsView 控件调用 OnModeChanged 方法来引发 ModeChanged 事件。The OnModeChanged method is called by the DetailsView control to raise the ModeChanged event. 它通常由控件开发人员在扩展 DetailsView 类时使用。It is generally used by control developers when extending the DetailsView class.

OnModeChanged 方法还允许派生类对事件进行处理而不必附加委托。The OnModeChanged method also allows derived classes to handle the event without attaching a delegate. 这是在派生类中处理事件的首选技术。This is the preferred technique for handling the event in a derived class.

Notes to Inheritors

在派生类中重写 OnModeChanged(EventArgs) 时,一定要调用基类的 OnModeChanged(EventArgs) 方法,以便已注册的委托对事件进行接收。When overriding OnModeChanged(EventArgs) in a derived class, be sure to call the base class's OnModeChanged(EventArgs) method so that registered delegates receive the event.

Applies to

See also