locked
Dragging ui element on Surface RT Problem RRS feed

  • Question

  • Hello, I am working on a Windows Store app that needs to allow user to drag an UIElement in a Canvas.
    I've made this by simply detecting the PointerPressed, PointerMoved and PointerReleased events to move the element at the finger position.

    It worked perfectly before, but now (after upgrading to Windows 8.1) the object is shaking when I "pause" the dragging (instead of just don't move because I don't move the finger).
    The rendering is really bad, and the problem only appears with my Surface RT (not with my computer).

    Any ideas? Or best approach to drag an element with the finger?

    Wednesday, October 23, 2013 10:09 PM

Answers

  • Thanks for your answer.

    In fact, I feel stupid the problem has disappear... I didn't changed anything, but it's just gone so I guess it was a problem on my device.
    I'll think about using manipulation events, thanks again for your quick answer!

    • Marked as answer by Enzo Chiaro Thursday, October 24, 2013 1:15 PM
    Thursday, October 24, 2013 1:14 PM

All replies

  • You'll generally get the best results using the Manipulation events rather than directly syncing the pointer events. See Quickstart: Touch input for an introduction and some sample code.

    To diagnose your code I'd debug to narrow down where the issue is: are you getting bad pointer events or is the input good but the rendering not keeping up? If it's bad pointer events you may need to debounce them yourself and ignore any moves smaller than some threshold.

    --Rob

    Wednesday, October 23, 2013 10:17 PM
    Moderator
  • Thanks for your answer.

    In fact, I feel stupid the problem has disappear... I didn't changed anything, but it's just gone so I guess it was a problem on my device.
    I'll think about using manipulation events, thanks again for your quick answer!

    • Marked as answer by Enzo Chiaro Thursday, October 24, 2013 1:15 PM
    Thursday, October 24, 2013 1:14 PM