locked
WinJS ListView in ListLayout with Variable Height Items ?

    Question

  • There have been some prior threads about this but there is no general solution mentioned. The groupinfo property does not work in LisLayout mode. Has anyone been able to figure a solution?
    Tuesday, July 24, 2012 1:26 PM

Answers

  • Unfortunately there's little more to suggest than searching in the WinJS file ui.js for "ListLayout" and examining the code in detail (to get to ui.js, open any HTML/JS project, expand "References," then expand "Windows Library for JavaScript" then "js" and you'll see the file.

    Like I said, we don't have docs on custom layouts at present. We're working to remedy that, but there's nothing to share yet.

    Monday, August 6, 2012 10:10 PM

All replies

  • ListLayout doesn't support variable heights. The general solution for this and other layout needs is to implement a custom layout object that you use in place of the provided ListLayout and GridLayout classes. Unfortunately, we currently lack docs on how to go about doing this, so the best you can really do is look at the ListLayout implementation in WinJS as a reference. We are working on pulling such docs together, but there isn't anything to share at present.
    Tuesday, July 24, 2012 4:16 PM
  • Can you kindly suggest a starting point with some references to code as I can't figure it out 
    Monday, August 6, 2012 8:40 PM
  • Unfortunately there's little more to suggest than searching in the WinJS file ui.js for "ListLayout" and examining the code in detail (to get to ui.js, open any HTML/JS project, expand "References," then expand "Windows Library for JavaScript" then "js" and you'll see the file.

    Like I said, we don't have docs on custom layouts at present. We're working to remedy that, but there's nothing to share yet.

    Monday, August 6, 2012 10:10 PM
  • heartbreak

    any progress on this?

    Tuesday, July 16, 2013 11:33 PM
  • Yes, the ListView in WinJS 2.0 (Windows 8.1 Preview) is vastly improved where layouts are concerned. In addition to ListLayout supporting horizontal there is also the CellSpanningLayout, VerticalGridLayout, grouped ListLayout, and the ability to do custom layouts with just a little CSS (way easier than WinJS 1.0).

    I haven't had a chance to work through the ListView samples for 8.1 yet, but all the new layouts are represented there.

    Wednesday, July 17, 2013 4:28 AM
  • http://msdn.microsoft.com/en-us/library/windows/apps/jj657974.aspx
    Tuesday, August 26, 2014 11:47 PM