WPF: Disable ListBox, but enable scrolling

Posted by Matt Briggs on Stack Overflow See other posts from Stack Overflow or by Matt Briggs
Published on 2009-02-09T17:42:06Z Indexed on 2010/06/09 11:52 UTC
Read the original article Hit count: 369

Filed under:
|
|

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 allow them to still scroll.

Solution:

All the answers were good, I went with swallowing mouse events since that was the most straight forward. I wired PreviewMouseDown and PreviewMouseUp to a single event, which checked my backgroundWorker.IsBusy, and if it was set the IsHandled property on the event args to true.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about listbox