locked
Is there a GridView Panel that shows a fixed amount of items and adapts the number according to size?

    Question

  • I am wondering if such functionality currently exists in the Windows SDKs.

    I am building a Hub for an app and each Section should adapt to how many items are visible
    at any point on the screen according to the available size. Fixed amount of items i.e no scrolling.
    For example it might show 9 items (no partials) when in landscape mode and 12 when in portrait.

    Is there anything i can use or do i have to implement this panel myself?

    Thank you


    Wednesday, March 4, 2015 9:55 PM

Answers

  • Hi Anargyros,

    MaximumRowsOrColumns property also affected by orientation, if we set orientation as Horizontal, setting MaximumRowsOrColumns as 3 will keep 3 columns and the rows will get automatically increased by the number of items.

    For instance we have 3 columns * 12 rows items in the portrait mode, how we can display all of them in landscape mode with 3 columns * 9 rows.

    There is no way to constrain both the columns and rows.

    --James


    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.

    Tuesday, March 10, 2015 6:37 AM
    Moderator

All replies

  • Hi Anargyros,

    Let's say we can have change the itempanel to VariableSizedWrapGrid class and while its on different orientation we set MaximumRowsOrColumns  as 9 or  12.

    Here is a great sample: https://code.msdn.microsoft.com/windowsapps/How-to-create-a-GridView-d3129308

    --James


    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.

    Thursday, March 5, 2015 6:35 AM
    Moderator
  • Hi Jamles

    I want to constrain both the columns and the rows.
    For example i want to say :
    "Always keep 3 columns of tiles and automatically adjust the number rows depending on available app height (i.e never show partials tiles)"

    Monday, March 9, 2015 6:19 PM
  • Hi Anargyros,

    MaximumRowsOrColumns property also affected by orientation, if we set orientation as Horizontal, setting MaximumRowsOrColumns as 3 will keep 3 columns and the rows will get automatically increased by the number of items.

    For instance we have 3 columns * 12 rows items in the portrait mode, how we can display all of them in landscape mode with 3 columns * 9 rows.

    There is no way to constrain both the columns and rows.

    --James


    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.

    Tuesday, March 10, 2015 6:37 AM
    Moderator