ActiveDesignerEventArgs Class

Definition

Provides data for the ActiveDesigner event.

public class ActiveDesignerEventArgs : EventArgs
Inheritance
ActiveDesignerEventArgs

Inherited Members

System.EventArgs

System.Object

Examples

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

Remarks

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.

Constructors

ActiveDesignerEventArgs(IDesignerHost, IDesignerHost)

Initializes a new instance of the ActiveDesignerEventArgs class.

Properties

NewDesigner

Gets the document that is gaining activation.

OldDesigner

Gets the document that is losing activation.