Editare

Partajați prin


MenuAdapter.OnPreRender(EventArgs) Method

Definition

Handles the OnPreRender(EventArgs) method for the associated Menu control.

protected public:
 override void OnPreRender(EventArgs ^ e);
protected internal override void OnPreRender (EventArgs e);
override this.OnPreRender : EventArgs -> unit
Protected Friend Overrides Sub OnPreRender (e As EventArgs)

Parameters

e
EventArgs

The EventArgs data associated with this event.

Remarks

The OnPreRender method calls an internal OnPreRender method in the Menu class. All other pre-rendering functions of the parent classes, such as data binding, applying styles, and event assignments perform as expected.

By default, the .NET Framework calls the Menu control's OnPreRender method. However, after the Adapter property of that control is set, the .NET Framework will call the adapter's implementation of the OnPreRender method instead of the control's implementation.

Use the OnPreRender method to finalize any settings in the control. Changes made to control properties in this phase will be saved to view state, but changes made in the Render method are not saved. For more information, see Architectural Overview of Adaptive Control Behavior.

Notes to Inheritors

If the adapter overrides the OnPreRender(EventArgs) method, it must call the corresponding method on the base class. Otherwise, the control's own OnPreRender(EventArgs) method will not be raised.

Applies to

See also