locked
Adjusting group headers layout in GridView? RRS feed

  • Question

  • I want to create a GridView with group headers similiar to Metro's built-in People app. The following pics come from this

    I have no problem creating the standard layout:

    BUT what I want is this:

    Any ideas..?

    Thursday, November 7, 2013 11:23 AM

All replies

  • Use a ListView instead.  Also, see this:
    http://msdn.microsoft.com/en-us/library/windows/apps/hh780627.aspx


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.


    Thursday, November 7, 2013 8:38 PM
    Moderator
  • As it finally turned out I never got this working...

    I used the code in the example you gave and played around back and forth with both ListView and GridView trying to alternate different combinations in the <GroupStyle.Panel> and <ItemsPanel> using <WrapGrid>, <ItemsWrapGrid>, <VirtualizingStackPanel> and <VariableSizedWrapGrid> including setting the property  MaximumRowsOrColumns. I think I managed to accomplish more or less every other possible layout except the one I wanted...

    Are you sure this even is possible using a standard ListView or GridView?

    Wednesday, December 18, 2013 11:00 AM
  • Wow, I thought this was a solved issue but I spent quite a bit of time on it today without resolving it.  I'll continue on this for a bit as it's not the first time we've had this question.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, December 18, 2013 7:08 PM
    Moderator
  • Ok thanks for your effort, just let me know if you would get around it. (PS. I spent hours as well..)
    Wednesday, December 18, 2013 7:26 PM