ViewEvent.TemplateModeChanged 字段

定义

指示更改控件设计器的模板模式引发了查看事件。Indicates that a view event was raised for changing the template mode of a control designer.

public: static initonly System::Web::UI::Design::ViewEvent ^ TemplateModeChanged;
public static readonly System.Web.UI.Design.ViewEvent TemplateModeChanged;
 staticval mutable TemplateModeChanged : System.Web.UI.Design.ViewEvent
Public Shared ReadOnly TemplateModeChanged As ViewEvent 

字段值

ViewEvent

注解

ViewEventHandler委托方法将 EventType 属性与静态字段进行比较 ViewEvent ,以确定引发事件的操作的类型。A ViewEventHandler delegate method compares the EventType property to the static ViewEvent fields to determine which type of action raised the event. ViewEvent对象等于 TemplateModeChanged ,指示在设计图面上的控件的模板编辑模式发生了更改。A ViewEvent object is equal to TemplateModeChanged to indicate that the template editing mode changed for a control on the design surface.

ControlDesigner类提供默认 ViewEventHandler 委托。The ControlDesigner class supplies a default ViewEventHandler delegate. 如果事件类型为 TemplateModeChanged ,则委托设置属性的值 InTemplateModeIf the event type is TemplateModeChanged, the delegate sets the value for the InTemplateMode property.

从类派生的自定义设计器 TemplatedControlDesigner 可以重写 OnTemplateModeChanged 方法,以便在设计图面上的控件的模板编辑模式更改时执行附加处理。Custom designers that are derived from the TemplatedControlDesigner class can override the OnTemplateModeChanged method to perform additional processing when the template editing mode changes for a control on the design surface.

适用于

另请参阅