ActiveDesignerEventArgs Class
TOC
Collapse the table of content
Expand the table of content

ActiveDesignerEventArgs Class

 

Provides data for the ActiveDesigner event.

Namespace:   System.ComponentModel.Design
Assembly:  System (in System.dll)

System.Object
  System.EventArgs
    System.ComponentModel.Design.ActiveDesignerEventArgs

[HostProtectionAttribute(SecurityAction.LinkDemand, SharedState = true)]
[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public class ActiveDesignerEventArgs : EventArgs

NameDescription
System_CAPS_pubmethodActiveDesignerEventArgs(IDesignerHost, IDesignerHost)

Initializes a new instance of the ActiveDesignerEventArgs class.

NameDescription
System_CAPS_pubpropertyNewDesigner

Gets the document that is gaining activation.

System_CAPS_pubpropertyOldDesigner

Gets the document that is losing activation.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

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.

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 NIB: Events and Delegates.

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.

public ActiveDesignerEventArgs CreateActiveDesignerEventArgs(IDesignerHost losingFocus, IDesignerHost gainingFocus)
{
    ActiveDesignerEventArgs e = new ActiveDesignerEventArgs(losingFocus, gainingFocus);
 return e;
}

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft