Windows Dev Center

The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ActiveDesignerEventArgs Class


Provides data for the ActiveDesigner event.

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


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

System_CAPS_pubmethodActiveDesignerEventArgs(IDesignerHost, IDesignerHost)

Initializes a new instance of the ActiveDesignerEventArgs class.


Gets the document that is gaining activation.


Gets the document that is losing activation.


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


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


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


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


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


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
© 2015 Microsoft