TemplateModeChangedEventArgs 类

定义

向设计图面上的控件的模板模式更改时引发的 ViewEvent 事件提供数据。Provides data for a ViewEvent event that is raised when the template mode changes for a control on the design surface.

public ref class TemplateModeChangedEventArgs : EventArgs
public class TemplateModeChangedEventArgs : EventArgs
type TemplateModeChangedEventArgs = class
    inherit EventArgs
Public Class TemplateModeChangedEventArgs
Inherits EventArgs
继承
TemplateModeChangedEventArgs

注解

对于ViewEvent设计图面上某个控件上的某些操作, Visual Studio 2005Visual Studio 2005该事件由设计器宿主引发。The ViewEvent event is raised by a designer host, such as Visual Studio 2005Visual Studio 2005, for certain actions on a control on the design surface. 例如, 当你进入或退出控件的模板编辑模式时, 将引发事件。For example, an event is raised when you enter or exit template editing mode for a control.

类提供用于处理事件的ViewEvent默认委托。 ControlDesignerThe ControlDesigner class supplies a default delegate to handle the ViewEvent event. 退出或进入模板编辑模式时, 设计ViewEventArgs器宿主将初始化TemplateModeChanged事件类型的对象, 然后使用TemplateModeChangedEventArgs对象设置该EventArgs属性。When you exit or enter template editing mode, the designer host initializes a ViewEventArgs object for a TemplateModeChanged event type, and then sets the EventArgs property with a TemplateModeChangedEventArgs object.

当对象指示模板模式已更改时, ControlDesigner类中的默认委托将InTemplateMode更新属性的值。 ViewEventArgsWhen the ViewEventArgs object indicates that the template mode has changed, the default delegate in the ControlDesigner class updates 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.

有关事件和委托的详细信息, 请参阅处理和引发事件For more information about events and delegates, see Handling and Raising Events.

构造函数

TemplateModeChangedEventArgs(TemplateGroup)

使用指定的模板组初始化 TemplateModeChangedEventArgs 类的新实例。Initializes a new instance of the TemplateModeChangedEventArgs class with the specified template group.

属性

NewTemplateGroup

获取进入模板编辑模式时创建的模板组。Gets the template group that was created when you entered template editing mode.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅