Rediger

Del via


ComponentRenameEventArgs Class

Definition

Provides data for the ComponentRename event.

public ref class ComponentRenameEventArgs : EventArgs
public class ComponentRenameEventArgs : EventArgs
[System.Runtime.InteropServices.ComVisible(true)]
public class ComponentRenameEventArgs : EventArgs
type ComponentRenameEventArgs = class
    inherit EventArgs
[<System.Runtime.InteropServices.ComVisible(true)>]
type ComponentRenameEventArgs = class
    inherit EventArgs
Public Class ComponentRenameEventArgs
Inherits EventArgs
Inheritance
ComponentRenameEventArgs
Attributes

Examples

The following example demonstrates creating a ComponentRenameEventArgs.

public:
   // This example method creates a ComponentRenameEventArgs using the specified arguments.
   // Typically, this type of event args is created by a design mode subsystem.
   ComponentRenameEventArgs^ CreateComponentRenameEventArgs( Object^ component, String^ oldName, String^ newName )
   {
      // The component that was renamed:          args.Component
      // The previous name of the component:      args.OldName
      // The new name of the component:           args.NewName
      return gcnew ComponentRenameEventArgs( component, oldName, newName );
   }
// This example method creates a ComponentRenameEventArgs using the specified arguments.
// Typically, this type of event args is created by a design mode subsystem.  
public ComponentRenameEventArgs CreateComponentRenameEventArgs(object component, string oldName, string newName)
{
    ComponentRenameEventArgs args = new ComponentRenameEventArgs(component, oldName, newName);

    // The component that was renamed:          args.Component
    // The previous name of the component:      args.OldName
    // The new name of the component:           args.NewName            

    return args;
}
' This example method creates a ComponentRenameEventArgs using the specified arguments.
' Typically, this type of event args is created by a design mode subsystem.  
Public Function CreateComponentRenameEventArgs(ByVal component As Object, ByVal oldName As String, ByVal newName As String) As ComponentRenameEventArgs
    Dim args As New ComponentRenameEventArgs(component, oldName, newName)

    ' The component that was renamed:          args.Component
    ' The previous name of the component:      args.OldName
    ' The new name of the component:           args.NewName            

    Return args
End Function

Remarks

A ComponentRenameEventArgs provides data about a ComponentRename event.

A ComponentRenameEventArgs object provides the following information:

  • A Component property that references the component being renamed.

  • An OldName property that indicates the old name of the component.

  • A NewName property that indicates the new name of the component.

Constructors

ComponentRenameEventArgs(Object, String, String)

Initializes a new instance of the ComponentRenameEventArgs class.

Properties

Component

Gets the component that is being renamed.

NewName

Gets the name of the component after the rename event.

OldName

Gets the name of the component before the rename event.

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