Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF drag cursor in default cursors

I'd like to use the default drag mouse cursor on mouse-over a UIElement to indicate a control is draggable.

The cursor that looks like an arrow and a FocusVisual rectangle with an overlapping plus sign inside a rectangle. Basically, the cursor that is used when setting DragDropEffects.Copy during a drag operation.

However I'd like to use this cursor like all the other types by using something like Cursor="DragCopy". Unfortunately it seems this cursor isn't available. I don't want to use a custom cursor because of compatibility and visual standards between OS.

Any suggestions?

like image 449
user275587 Avatar asked Jun 19 '10 07:06

user275587


1 Answers

You'll need to p/invoke the SetCursor Win32 method.

like image 120
Daniel Moore Avatar answered Oct 24 '22 04:10

Daniel Moore