Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You need to use the full Gesture Recognizer functionality from WinRT for the best experience. MSDN has a fully worked through sample <a href="http://code.msdn.microsoft.com/windowsapps/Manipulations-and-gestures-26918bb3" rel="nofollow">here</a>. This will then allow you to grab the manipulation for a DIV and work with it as appropriate. A simple walk through is <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465869.aspx" rel="nofollow">here</a>. Note the need to:</p> <ol> <li>Create a MSGesture object</li> <li>Capture MSPointerDown, and add the pointer ID to the gesture instance created in 1.</li> </ol> <p>An additional consideration is to look at your experience and consider if using <a href="http://code.msdn.microsoft.com/windowsapps/Scrolling-panning-and-47d70d4c" rel="nofollow">mandatory snap points</a>, and multiple items in a scroller may work for your experience.</p> <p>Some sample code:</p> <pre><code>&lt;div id="touchMe" style="width:500px; height: 500px; background-color: yellow; "&gt;&lt;/div&gt; </code></pre> <p>JavaScript, run when touchMe is available:</p> <pre><code>var v = document.getElementById("touchMe"); v.addEventListener("MSGestureStart", function () { console.log("foo"); }); var gestureThing = new MSGesture(); gestureThing.target = v; v.dooHicker = gestureThing; v.addEventListener("MSPointerDown", function (e) { gestureThing.addPointer(e.pointerId); console.log("down"); }); v.addEventListener("click", function () { console.log("click"); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload