I need to get a property of a TreeViewItem
. I am able to get the reference of the treeViewItem
(named tvi), But in the visual tree which I see it has a property called DocumentCount
. I need to use the value of this property in the test code. I have no idea how to do that. Any insight would be great. I am attaching a snapshot of the visual tree for a better understanding
var dtn = (DocTreeNode)tvi.Header;