locked
Displaying GridView items in different resolutions

    General discussion

  • I  have a variablesizegridview and displaying the items properly. my data template contains image in the first row and some text content in second row. if text and image exist it is displaying properly , but if i don't have any image my gridview item is displaying at the center and width of the item is 70% only. anyone please guide me how to display items with different heights and widths. items will be binded dynamically


    suresh

    Monday, March 24, 2014 4:02 PM

All replies

  • Hi,

    The link below contains an example to let a GridView display content, based on screen orientation/resolution.May be that can help you:

    http://social.msdn.microsoft.com/Forums/windowsapps/en-US/3e05a250-3066-4c03-8a29-4e3a0799bb28/elements-in-row-based-on-resolution?forum=winappswithcsharp

    And you can refer to the links:

    http://msdn.microsoft.com/en-us/library/windows/apps/hh465349.aspx

    http://msdn.microsoft.com/en-us/library/windows/apps/hh465362.aspx

    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.

    Tuesday, March 25, 2014 3:31 AM
  • i have one general question please help me.

    can i have 2 items in single row if we use wrap panel like this

     <VariableGridView.ItemsPanel>
     <ItemsPanelTemplate>
     <WrapPanel Orientation="Vertical" HorizontalAlignment="Left" ItemWidth="145" ItemHeight="280"/>
     </ItemsPanelTemplate>
     </VariableGridView.ItemsPanel>

    if i place 'VariableSizedWrapGrid' like this in the above code

    <VariableSizedWrapGrid Orientation="Vertical" VerticalAlignment="Top" ItemHeight="282" ItemWidth="330" HorizontalAlignment="Left"/>

     instead of wrap panel i can achieve my goal. 

    but my problem is wrap panel will adjust the height of the items means every item has its own height depending upon the content. but if we user variablesizedwrapgrid it will show empty space for the items if the content is less.


    suresh


    • Edited by Dev_SSC Wednesday, March 26, 2014 5:12 AM
    Wednesday, March 26, 2014 5:10 AM