How to place items in 6x12(6 rows and 12 columns) in gridview? RRS feed

  • Question

  • Hi, 

    am developing a windows store 8.1 app using C# and xaml.

    i want to place items as 6 rows and 12 columns. i took a Gridview and i gave the itemssource as Observable collection.

    How can i design a template which comes items as 6 rows and 12 columns.

    Wednesday, October 15, 2014 4:03 AM

All replies

  • You can do a couple of things...

    Set the width and height of the GridView Item template and figure out exactly how big the Grid should be in order to accommodate a 6x12 grid.

    You could also just use a Grid directly with Rows and Columns, then add the items to that Grid, then set the Row and Column dependency properties for each item you add.

    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, October 15, 2014 2:11 PM
  • yeah Matt i tried the first option and it is working cool..

    but the thing is, my app has swapping functionality where user can swap the gridview items in the bin.

    When i use the vertical scroll viewer in touch mode the swapping functionality is not working.

    Because in touch mode when u drag initially it always looks for the scrolling. As i kept a vertical scroll viewer it always goes with it, the swapping functionality get struck.

    How to overcome this issue?

    Wednesday, October 15, 2014 2:56 PM