Search code examples
c#windows-8microsoft-metrowindows-store-appswindows-store

Drag and Drop items Within a gridview


Is there any way, drag and drop items in same Gridview for reordering the items?

I visited these examples but in both examples drag and drop allows items in different GridViews.

http://blogs.msdn.com/b/going_metro/archive/2012/07/16/drag-and-drop-within-a-grouped-grid-view.aspx

http://www.renauddumont.be/en/2012/windows-8-csharp-xaml-drag-drop

I am trying to drag and drop items in same Gridview for reordering the items.

Thanks


Solution

  • Just add these lines in GridView XAML

                CanReorderItems="True"
                AllowDrop="True"
                CanDragItems="True"