Hello, i want to update my question. How can i control the HierarchicalDataTemplate's TextBlock?
Example: With a list of Fruits and Flowers which maybe have same ids because my source is in many databases
Fruit (ID, Name): ( 01, Apple), ( 02, Orange)... , with ( 0, All Fruits) is a treenode
Flower (ID, Name): ( 01, Rose), ( 03, jasmine)... , with ( 0, All Flowes) is a treenode
-- DataTemplate shows Name in treeview and treeview.selectedvalue is ID
-- Can I check selected Name to know it's of fruit or flower?
An other example in images:
-- how can i get "AP" before debug. eg: something likes (treeview.SelectedItem).mota
with seleced item.png
-- or how to know ID of SelectedValue is of _List1 or _List2 ?
Thank you, Merry Chrismas and Happy new year.