I have a 2-level TreeView, and on the children (second level), there is a button in the entry. That is, each child shows some text, and a button. When the button is clicked, and an event is generated, how to get the TreeView element that was clicked? Btw, it will not necessarily be the SelectedItem, because the button may be clicked on a different item.
Here is a specific example. The TreeView contains Orders, and Parts within Orders. The top level of the tree will be the Orders, and under each order will be a list of parts in the tree. Each Part item will have an 'Edit' button. When the Edit button is clicked, how to determine the specific TreeView item that contained the edit button so that particular item can be edited?
Here is a specific example. The TreeView contains Orders, and Parts within Orders. The top level of the tree will be the Orders, and under each order will be a list of parts in the tree. Each Part item will have an 'Edit' button. When the Edit button is clicked, how to determine the specific TreeView item that contained the edit button so that particular item can be edited?