/// <summary> /// Called when the underlying ListView raises the NodeLabelEdited event</summary> /// <param name="e">Event args from the underlying ListView's NodeLabelEdited event</param> protected virtual void OnNodeLabelEdited(LabelEditEventArgs e) { IListView listView = m_listViewAdapter.ListView; ListViewItem item = m_listView.Items[e.Item]; INamingContext namingContext = listView.As <INamingContext>(); if (namingContext != null && namingContext.CanSetName(item.Tag)) { ITransactionContext transactionContext = listView.As <ITransactionContext>(); transactionContext.DoTransaction( delegate { namingContext.SetName(item.Tag, e.Label); }, "Edit Label".Localize()); } }