使 WPF 中的列表框项目不可选择 [英] make Listbox items in WPF not selectable
本文介绍了使 WPF 中的列表框项目不可选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 WPF 中有一个列表框,当他们选择一个项目时,它显示出难看的颜色我可以将所有项目设为不可选择吗?
I have a listbox in WPF, and when they select an item, it shows an ugly colors Can I make all the items non-selectable?
推荐答案
如果您不需要选择,请使用 ItemsControl
而不是 ListBox
If you don't need selection, use an ItemsControl
rather than a ListBox
这篇关于使 WPF 中的列表框项目不可选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文