The TreeView control provides editing support. Set the isReadOnly property to false and users will be able to edit the content of the nodes by pressing the F2 key.
Edits made to node contents are automatically applied to the items in the itemsSource array using the properties specified by the displayMemberPath property.
You may customize the editing behavior using the following events: nodeEditStarting, nodeEditStarted, nodeEditEnding, and nodeEditEnded.
In the example below, we enable editing only for nodes that contain no children. To edit, select a node and press F2: