What is the difference between Mouse.OverrideCursor and this.Cursor

What is the difference between using

Mouse.OverrideCursor = Cursors.Wait 

and

 this.Cursor = Cursors.Wait. 

which one is correct?
Since I use WPF and C# .

+8
c # wpf
source share
1 answer

The main difference is that Mouse.OverrideCursor set the mouse cursor for the entire application, and this.Cursor set it only for this particular FrameworkElement .

Thus, it will depend on what you want to do.

If you want to show the wait cursor for the entire application, use Mouse.OverrideCursor , but if you want to show the wait cursor over a specific part of the application, use this.Cursor .

+11
source share

All Articles