Share via


HierarchyInfo.OnRenamed(HierarchyRenameEventArgs) Method

Definition

Occurs when the Rename command is called from the user interface (UI) or programmatically and is not canceled from the OnRenaming(HierarchyRenameEventArgs) method.

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

Parameters

e
HierarchyRenameEventArgs

A HierarchyRenameEventArgs that contains the event data.

Examples

The following example implements the OnRenamed method and writes the old and new names to the trace listener.

protected override void OnRenamed(HierarchyRenameEventArgs e)
{
    Trace.WriteLine("Node Name change from: "
        + _sNodeName + " to: " + e.Label);
    _sNodeName = e.Label;
}

Remarks

To rename a node, you must set the SupportsRename property to true. Unless the program supports renaming, the displayed name will not change.

Applies to