locked
How to implement collapse/expand ListView menu like official mail app? RRS feed

  • Question

  • Hi. I'm working for develop iTunes-style e-book management app for Windows Store.

    My question is that how to implement ListView which can collapse/expand of it's subitems.

    I think the best example is official e-mail apps of microsoft. This app has well-designed collapsible ListView menu on left side.

    But I can't find any resource of that. Any resources or idea?


    • Edited by Kichang Kim Tuesday, October 22, 2013 3:50 PM
    Tuesday, October 22, 2013 3:49 PM

Answers

  • There isn't a turnkey control with that behavior, but it shouldn't be hard to build from existing controls.

    I would create it as a ListView with each item being one of the categories. The Template for the category item would be expandable to display a list of the sub items when selected.

    --Rob

    • Marked as answer by Kichang Kim Thursday, October 24, 2013 4:36 AM
    Tuesday, October 22, 2013 10:41 PM
    Moderator

All replies

  • There isn't a turnkey control with that behavior, but it shouldn't be hard to build from existing controls.

    I would create it as a ListView with each item being one of the categories. The Template for the category item would be expandable to display a list of the sub items when selected.

    --Rob

    • Marked as answer by Kichang Kim Thursday, October 24, 2013 4:36 AM
    Tuesday, October 22, 2013 10:41 PM
    Moderator
  • Thanks for reply. I mimicked expandable list menu with ListView and User Control successefully.
    Thursday, October 24, 2013 4:39 AM
  • Hi Kichang,

    I need to implement the same piece of functionality and facing some issue.

    can you please share the code if you have been successful in doing the same.

    thanks

    Richa

    Tuesday, September 9, 2014 10:40 AM
  • Hi Kichang,

    I need to implement the same piece of functionality and facing some issue.

    can you please share the code if you have been successful in doing the same.

    thanks

    Richa

    Hi. Simply, I implement it as listview with simple custom control. And override OnClick event of custom control, which change it's visibility and it's child menu item.

    here is source code of my TreeMenuItem control. (xaml and cs file) and you should modify this code to fit your application :)

    http://pastebin.com/R0xwXY8N

    http://pastebin.com/HGdBBFfh


    • Edited by Kichang Kim Wednesday, September 10, 2014 12:35 PM
    Wednesday, September 10, 2014 12:28 PM