System.Web.UI.Design.TemplatedControlDesigner.OnTemplateModeChanged Method

Provides an opportunity to perform additional processing when the template mode is changed.

Syntax

protected virtual void OnTemplateModeChanged ()

Remarks

The IControlDesignerView.ViewEvent event is raised by the designer host for certain actions on a control in the design surface. For example, an event is raised when the user enters or exits template editing mode for a control.

The System.Web.UI.Design.TemplatedControlDesigner class supplies a default delegate to handle the IControlDesignerView.ViewEvent event. Classes deriving from the System.Web.UI.Design.TemplatedControlDesigner override the TemplatedControlDesigner.OnTemplateModeChanged method to process events that are raised when the template mode changes for the associated control.

The TemplatedControlDesigner.OnTemplateModeChanged method allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

The default delegate performs the updates that are required for a template mode change event in the base System.Web.UI.Design.TemplatedControlDesigner class, and then calls the TemplatedControlDesigner.OnTemplateModeChanged method. The base TemplatedControlDesigner.OnTemplateModeChanged method in the System.Web.UI.Design.TemplatedControlDesigner class returns without performing any additional processing for the event. If a class derives from the System.Web.UI.Design.TemplatedControlDesigner and overrides the base TemplatedControlDesigner.OnTemplateModeChanged method, the default delegate calls the override method in the derived class.

Use the ControlDesigner.InTemplateMode property to determine whether the control designer is in template editing mode currently.

Requirements

Namespace: System.Web.UI.Design
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0