locked
Implementing Listbox Item Drag and Drop functionality for sorting RRS feed

  • Question

  • Hi,

    I want to implement Listbox sorting using Drag and Drop Listbox item functionality.

    There is solution available for Windows Phone 7 at http://reorderlistbox.codeplex.com/

    But I want to achieve this in Windows Store apps, is it possible to do this and how to do it.

    Thanks in advance !!


    Himanshu Nigam

    Wednesday, November 20, 2013 2:06 PM

Answers

  • Hi,

    The ListBox is an older control primarily for compatibility with other xaml frameworks. The ListView/GridView has build-in functionality for touch etc. Use the ListView/GridView unless you have a specific need for the ListBox.

    According to Drag and Drop functionality, there are some special events and properties can only be used for ListView/Gridview.

    Specific events available only for ListView/Gridview:

    DragItemsStarting

    Properties:

    CanDragItems

    CanDragItemsProperty

    CanReorderItems

    CanReorderItemsProperty

    You can refer to the link to know how to drop and drag items in Listview/Gridview and reorder the GridView/ListView item:

    http://code.msdn.microsoft.com/windowsapps/XAML-ListView-and-GridView-6bd77f71

    Best Wishes!

     


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    • Edited by Anne Jing Thursday, November 21, 2013 8:38 AM edit
    • Marked as answer by Anne Jing Tuesday, November 26, 2013 7:44 AM
    Thursday, November 21, 2013 8:37 AM