HierarchyInfo.OnRenamed(HierarchyRenameEventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.