Share via


HierarchyInfo.OnRenaming(HierarchyRenameEventArgs) Method

Definition

Occurs when the Rename command is called from the user interface (UI) or programmatically.

protected public:
 virtual void OnRenaming(Microsoft::Web::Management::Client::HierarchyRenameEventArgs ^ e);
protected internal virtual void OnRenaming (Microsoft.Web.Management.Client.HierarchyRenameEventArgs e);
abstract member OnRenaming : Microsoft.Web.Management.Client.HierarchyRenameEventArgs -> unit
override this.OnRenaming : Microsoft.Web.Management.Client.HierarchyRenameEventArgs -> unit
Protected Friend Overridable Sub OnRenaming (e As HierarchyRenameEventArgs)

Parameters

e
HierarchyRenameEventArgs

A HierarchyRenameEventArgs that contains the event data

Examples

The following example implements the OnRenaming method and writes the new name to the trace listener.

protected override void OnRenaming(HierarchyRenameEventArgs e)
{
    Trace.WriteLine("OnRenaming called with e.Label = \"" + e.Label + "\"");
    e.Cancel = false;
}

Remarks

Application developers can set the Microsoft.Web.Management.Client.HierarchyRenameEventArgs.Cancel property to false to prevent the node name from changing.

Applies to