I have WPF treeView which has ControlTemplate which show every node of treeView consisting of two elements : Image + Textbox. When I change TextBox treeView element not select. But I want to get Selected class in TextChanged event of TextBox. How can I get class to which current textBox Bound in code behind.
I have WPF treeView which has ControlTemplate which show every node of treeView consisting
Share
Try this:
Bind textbox’s
IsFocusedproperty to treeviewitems’sIsSelectedpropertyElse Add a trigger to the textbox such that whenever the
IsFocusedproperty is set to true, the corresponding treeviewitem’sIsSelectedproperty is also set true.