Treeview hide [+] [-] buttons

后端 未结 2 936
隐瞒了意图╮
隐瞒了意图╮ 2021-01-07 11:48

Does anyone know how to hide the [-] button for a treeview? The treeview will never be collapsed, and therefore I dont need the root node to have the collapse option. I know

2条回答
  •  有刺的猬
    2021-01-07 12:14

    I implemented this recently. On the TreeView control I just set:

    IsHitTestVisible="False"
    

    and added into my app.xaml:

    
    

    Though this removes the ability to select any of the TreeViewItems. I just did it because I wanted the simple hierachical representation of some data I had.

提交回复
热议问题