开发者

How to make a WPF tree view non-collapsible and non-selectable

I want to display data from and XML document in a tree-like display but I don't need items to be selectable and I don't want them t开发者_如何学编程o be collapsible.

Any way to do this with TreeView? Is TreeView even the right control to use?

Thanks!


You can handle the PreviewMouseDown and cancel the event. If you need to allow scrolling, you can do a HitTest and see if it is over the "ScrollerChrome". If you need more details, I can provide code.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜