WPF: Disable ListBox, but enable scrolling

前端 未结 12 2101
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-05 05:33

Been banging my head against this all morning.

Basically, I have a listbox, and I want to keep people from changing the selection during a long running process, but

12条回答
  •  执念已碎
    2021-01-05 05:58

    I used this solution, it's really easy and works perfectly:

    For every SurfaceListBoxItem item you put in the Listbox, do this:

    item.IsHitTestVisible = false;
    

提交回复
热议问题