WPF drag rectangle with touch -
i have wpf app canvas inside scrollviewer. on canvas have rectangles drag along timeline (left-right). works fine mouse, on touch screen weird behavior if canvas wider main form. first, when begin drag rectangle, canvas pans until has scrolled limit, rectangle starts move. doesn't when using mouse.
another strange if pan/drag canvas (using touch) limit of scrollviewer, main form compresses 20-50 pixels on side opposite of pan direction. springs shape stop dragging. what's going on here , how disable this?
it seems has manipulationboundaryfeedback, don't understand how...
edit: able little further setting scrollviewer panningmode panningmode.none in rectangle touchdown handler , setting panningmode.both in touchup handler. solved problem of canvas panning limit before rectangle move.
well, got app work touch. mentioned above, setting panningmode none on touchdown event eliminated problem scrollviewer. setting both in touchup event re-enabled it. means can't drag rectangle past point scrollviewer start panning, in case not problem.
i had issues mouseleftbuttondown event firing during touchmove event removed during touchdown
-= new mousebuttoneventhandler(drag_start)
and re-added during touchup eliminate glitchy behavior.
+= new mousebuttoneventhandler(drag_start)
maybe in future...
Comments
Post a Comment