ActiveDesignerEventArgs 类
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为 ActiveDesigner 事件提供数据。
public ref class ActiveDesignerEventArgs : EventArgs
C#
public class ActiveDesignerEventArgs : EventArgs
type ActiveDesignerEventArgs = class
inherit EventArgs
Public Class ActiveDesignerEventArgs
Inherits EventArgs
- 继承
以下示例方法返回一个 , ActiveDesignerEventArgs 其中包含对 IDesignerHost 设计器失去焦点的指定引用,以及针对获得焦点的设计器的 指定引用 IDesignerHost 。
ActiveDesignerEventArgs^ CreateActiveDesignerEventArgs( IDesignerHost^ losingFocus, IDesignerHost^ gainingFocus )
{
ActiveDesignerEventArgs^ e = gcnew ActiveDesignerEventArgs( losingFocus, gainingFocus );
return e;
}
C#
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 当前活动文档发生更改时,将发生 该事件。 创建新文档、打开现有文档或关闭文档时,活动文档会更改。
创建 ActiveDesignerEventArgs 委托时,需要标识将要处理该事件的方法。 若要将事件与事件处理程序关联,请将该委托的一个实例添加到事件中。 除非移除了该委托,否则每当发生该事件时就会调用事件处理程序。 有关事件处理程序委托的详细信息,请参阅 处理和引发事件。
New |
获取正在激活的文档。 |
Old |
获取正在失活的文档。 |
Equals(Object) |
确定指定对象是否等于当前对象。 (继承自 Object) |
Get |
作为默认哈希函数。 (继承自 Object) |
Get |
获取当前实例的 Type。 (继承自 Object) |
Memberwise |
创建当前 Object 的浅表副本。 (继承自 Object) |
To |
返回表示当前对象的字符串。 (继承自 Object) |
产品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |