Disable mouse clicks when displaying busy / wait cursor in WPF

I am currently showing a busy / waiting cursor using Mouse.OverrideCursor = Cursors.Wait. But when the wait cursor is on, it can still recognize mouse clicks that were made during this time. Is there a way to disable mouse clicks?

Thank you

+4
source share
1 answer
this.IsHitTestVisible = false; 

but a more elegant solution would be (assuming you use the MVVM pattern) to reject the mouse click in the RelayCommand CanExecute method.

+4
source

All Articles