Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TemplatedControlDesigner.OnTemplateModeChanged Method

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

Namespace: System.Web.UI.Design
Assembly: System.Design (in system.design.dll)

protected virtual void OnTemplateModeChanged ()
protected void OnTemplateModeChanged ()
protected function OnTemplateModeChanged ()
Not applicable.

The 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 TemplatedControlDesigner class supplies a default delegate to handle the ViewEvent event. Classes deriving from the TemplatedControlDesigner override the OnTemplateModeChanged method to process events that are raised when the template mode changes for the associated control.

The 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 TemplatedControlDesigner class, and then calls the OnTemplateModeChanged method. The base OnTemplateModeChanged method in the TemplatedControlDesigner class returns without performing any additional processing for the event. If a class derives from the TemplatedControlDesigner and overrides the base OnTemplateModeChanged method, the default delegate calls the override method in the derived class.

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

Notes to Inheritors: The default delegate that is supplied by the TemplatedControlDesigner class performs all updates necessary for the base class before calling the OnTemplateModeChanged method. Override the OnTemplateModeChanged method in classes deriving from the TemplatedControlDesigner to perform additional processing for template mode change events on controls in the design surface.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2015 Microsoft