Handling inheritance event

zhaozj2021-02-16  56

Handling inherited events To process inheritance events, rewrite protected ON from the base class inheritance

EventName method, not additional delegation.

Under normal circumstances, the rewriting method should call the base class.

EventName method, thus ensuring that the call attached to the event (unless you do not want to call these delegates).

MSDN template control sample code snippet describes how template controls handle inheritance DataBinding events to ensure that sub-controls are created before calling data binding event handles.

Protected Override Void OndataBinding (Eventargs E) {EnsureChildControls (); Base.OndDataBinding (E);

转载请注明原文地址:https://www.9cbs.com/read-21384.html

New Post(0)