c# - WPF Thumb drag behaviour wrong -


I created a thumb in WPF.

  Private Zero Thumb_DragDelta (Object Sender, System.Windows Control.Premitives.DragDelTeventEurges e) {MyValue = e.VerticalChange; }   

This works fine, however, when my button is clicked again, the value starts at the point where I clicked (0). I need to click and drag to change the relative value of the original. So I tried to do this:

  Private Zero Thumb_DragDelta (Object Sender, System.Windows.Controls.Primitives.DragDeltaEventArgs ) {MyValue + = e.VerticalChange; }   

This works, but when I pull down and then go up, the value decreases, even if I take the mouse back up. The only thing when moving the mouse up (the value increases), and then move the mouse back down (the value keeps increasing).

How it works:

  double minLeft = double MaxValue; Double hntop = double. Maxwell; Double left = canvas. Gadget left (item); Double top = canvas.Tet (item); MinLeft = Double. ISNAN (left)? 0: Math (Left, minorleaf); MinTop = Double. ISNAN (Top)? 0: Math (Top, Mintop); Double delhoraciontal = monastery.max (-min lift, e. Horizontal change); Double Delta Vatic = Meth. Max (-Mantop, E. Vertical Change);   

Replace your container control with the canvas.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -