Getting the SelectedIndex of a child node in a TreeView
-
29-10-2019 - |
Question
I am currently working on a wpf project in C#.
I have a treeview created that has parent nodes with childen nodes inside of it.
I was wondering if there was a way to get the index of the child node the user clicked on. (Simmilar to ".SelectedIndex" when using comboboxes)
I have tried Various ways such as:
int val =TreeView.SelectedItemProperty.GlobalIndex;
and
fileInput.IndexOf(treeView1.SelectedItem);
But they dont seem to work.
Any suggestions or comments are greatly appreciated.
Thanks
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow