ActiveDesignerEventArgs 类

定义

ActiveDesigner 事件提供数据。Provides data for the ActiveDesigner event.

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

示例

下面的示例方法返回一个ActiveDesignerEventArgs , 它包含IDesignerHost对设计器丢失焦点的的指定引用和对设计器获取焦点IDesignerHost的的指定引用。The following example method returns an ActiveDesignerEventArgs that contains a specified reference to the IDesignerHost for the designer losing focus and a specified reference to the IDesignerHost for the designer gaining focus.

ActiveDesignerEventArgs^ CreateActiveDesignerEventArgs( IDesignerHost^ losingFocus, IDesignerHost^ gainingFocus )
{
   ActiveDesignerEventArgs^ e = gcnew ActiveDesignerEventArgs( losingFocus, gainingFocus );
   return e;
}
public ActiveDesignerEventArgs CreateActiveDesignerEventArgs(IDesignerHost losingFocus, IDesignerHost gainingFocus)
{
    ActiveDesignerEventArgs e = new ActiveDesignerEventArgs(losingFocus, gainingFocus);
    return e;
}
Public Function CreateActiveDesignerEventArgs(ByVal losingFocus As IDesignerHost, ByVal gainingFocus As IDesignerHost) As ActiveDesignerEventArgs
    Dim e As New ActiveDesignerEventArgs(losingFocus, gainingFocus)
    Return e
End Function

注解

当前ActiveDesigner活动文档更改时发生该事件。The ActiveDesigner event occurs when the currently active document changes. 当创建新文档、打开现有文档或关闭文档时, 活动文档将会更改。The active document changes when a new document is created, an existing document is opened, or a document is closed.

创建 ActiveDesignerEventArgs 委托时,需要标识将要处理该事件的方法。When you create an ActiveDesignerEventArgs delegate, you identify the method that will handle the event. 若要将事件与事件处理程序关联,请将该委托的一个实例添加到事件中。To associate the event with your event handler, add an instance of the delegate to the event. 除非移除了该委托,否则每当发生该事件时就会调用事件处理程序。The event handler is called whenever the event occurs, unless you remove the delegate. 有关事件处理程序委托的详细信息, 请参阅处理和引发事件For more information about event-handler delegates, see Handling and Raising Events.

构造函数

ActiveDesignerEventArgs(IDesignerHost, IDesignerHost)

初始化 ActiveDesignerEventArgs 类的新实例。Initializes a new instance of the ActiveDesignerEventArgs class.

属性

NewDesigner

获取正在激活的文档。Gets the document that is gaining activation.

OldDesigner

获取正在失活的文档。Gets the document that is losing activation.

方法

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)

适用于

另请参阅