c# - WPF equivalent of Control.CursorChanged event -


I am trying to change my mouse cursor at some point when I am pulling my mouse in a wpf listview . However, when I set my mouse, it immediately gets overloaded from something else, and turns it back into the drag cursor.

I'm not sure where the cursor changes come from, it's definitely not my code, so it should be a system. If this is a system, then I have to block the event for cursor changes, and to show the cursor whether I want to handle the incident, right?

So this control has a WPF equivalent. Cursor changes event? Or perhaps there is no other way to deal with this problem?

Edit:

Part of my code here

  Private Zero SetDragCursor () {if (_badDragLoc) {Mouse.OverrideCursor = Cursors.No ; } And {mouse. Override crackers = cursor.arrow; }} Private Zero inventory viewer (object sender, DragEventArgs E) {if (at a bad drag spot) {_badDragLoc = true; SetDragCursor (); }}   

I also have the event event handler in which I have the SetDragCursor () method even when I step through the step-by-step debugger through each line of code The mouse is moved from cursor to drag cursor, when it enters the drag and moves into the handler. This is the reason why I think this system should be.

If this is actually a system, if I can catch the shootout of the incident, then I can handle those incidents myself and it does not bubble. / P>

Thanks!

Just does not work like this, the way to set up is a cursor during the dragOver event:

  zero listView__DragOver (object sender, DragEventArgs e) {if (e.Data.GetDataPresent ("picture")!) {E.Effects = DragDropEffects. No one; E.Handled = True; }}   

Depending on the value of the dragprophaphix enum, if you assign to e.Effects , the mouse cursor will change.

Do not Call Mouse. Override cursor because it is not correctly.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -