-1

I'am developing a windows store application, I have used WinRT XAML Toolkit tree view control for display hierarchical data. Tree view is populate and working correctly. But I need to do small change, in the treeview it has expander button. I need that functionality into heading item. When user click on heading it should work like expander button. I want to expand the node if user click that heading also. How can i do this? Thanks

bhathiya.m
  • 215
  • 2
  • 12
  • Do you mean you want the tree node to expand when the text gets clicked instead of only when the toggle on the side does? – Filip Skakun Feb 20 '15 at 17:53

1 Answers1

2

You can put a Button or ToggleButton as an item or in ItemTemplate (depending on whether you are using ItemsSource to populate the TreeView with nodes) and handle a Click event on the Button to toggle the node's expansion state.

Filip Skakun
  • 31,624
  • 6
  • 74
  • 100
  • Can you give some example code to handle node's expansion state. I have searched that in the WinRT XAML Toolkit source code. But i couldn't find that. Thanks Filip. – bhathiya.m Feb 22 '15 at 15:10