Creating Drag-and-Drop Items

The ItemContainer is compatible with standard HTML5 drag and drop. You enable drag and drop for an ItemContainer by setting the draggable option to the value true like this:

<div data-win-control="WinJS.UI.ItemContainer" data-win-options="{draggable:true}">    Item 1</div>

After you enable drag and drop for an ItemContainer, you can handle the standard HTML5 drag and drop events:

Image dragstart—Raised when you start dragging a draggable ItemContainer.

Image dragover—Raised when you drag an ItemContainer ...

Get Windows® 8.1 Apps with HTML5 and JavaScript Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.