Is there a control in WPF similar to the Visual Studio toolbox?

后端 未结 3 1543
生来不讨喜
生来不讨喜 2021-01-19 03:34

I\'m writing an application using WPF, and I need to make something that looks like the Visual Studio toolbox (please see pic). What control should I use for this?

<

3条回答
  •  抹茶落季
    2021-01-19 04:34

    You would use either a ListView or a TreeView. Both controls allow you to write templates for your items, the difference is that the TreeView is hierarchical. Which control you use depends on the structure of your data, but you will proabably use the TreeView.

    For your TreeView you will have to define two item templates, one for the root items and one for the child items. It should be quite easy, but it depends on your data of course.

提交回复
热议问题