ComponentRenameEventArgs
Class
Definition
Provides data for the ComponentRename event.
[System.Runtime.InteropServices.ComVisible(true)]
public class ComponentRenameEventArgs : EventArgs
- Inheritance
- Attributes
Inherited Members
System.EventArgs
System.Object
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. |