开发者

Simple WPF ItemsSource Control

开发者 https://www.devze.com 2023-03-31 08:45 出处:网络
This feels like a stupid question, but is there a simple control for WPF that just displa开发者_Go百科ys a collection of items? I am currently using a ListBox to display a collection of usercontrols,

This feels like a stupid question, but is there a simple control for WPF that just displa开发者_Go百科ys a collection of items? I am currently using a ListBox to display a collection of usercontrols, but the selection element is not needed and the highlighting is actually a distraction. I could disable the highlighting, but this seems like extra work if a simpler control exists. I don't need to track the selected item.

Basically, I want a stackpanel that I can just define an itemssource of viewmodels for. Does such a thing exist?


You can use an ItemsControl - it's pretty much exactly what you are looking for

0

精彩评论

暂无评论...
验证码 换一张
取 消