Uređivanje

Dijeli putem


ActiveDesignerEventArgs Class

Definition

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
Inheritance
ActiveDesignerEventArgs

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 Handling and Raising Events.

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.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also