Customizing the TreeView to allow multi select

前端 未结 4 1853
迷失自我
迷失自我 2020-12-02 15:24

The built-in WPF TreeView control does not allow for multi selection, like a ListBox does. How can I customize the TreeView to allow for multi selection without rewriting i

4条回答
  •  被撕碎了的回忆
    2020-12-02 15:53

    When I consider overriding the fundamental behavior of a control, like a treeview, I always like to consider the usability and effort associated with my decision.

    In the specific case of a treeview I find that switching to a listview in combination with zero, one, or more controls makes for a more usable solution that often is easier to implement.

    As an example, consider the common Open dialog, or Windows Explorer application.

提交回复
热议问题