locked
Defining ListView templates in HTML

    Question

  • According to this article, entitled "Styling the ListView and its items (Metro style apps using JavaScript and HTML", When you are defining a template for us within a ListView control, you must always set the height and width of an element in the HTML template. I thought the point of CSS was to set the style (color, size, etc) and the HTML was only for defining the elements and their order.

    Article in question: http://msdn.microsoft.com/en-us/library/windows/apps/hh850406.aspx
    Direct Quote: "There are two ways to style items in your ListView. You can apply styles to the item template, or you can override the win-container class. There's one thing that you must always do in your template, and that's set the size of your items. If you don't set the size of your items, you might not get the layout you want."


    Is this information correct?
    If this is correct why is it done like this?
    What are the draw backs of ignoring this advice and setting the size in CSS?


    • Edited by ResQue1980 Saturday, August 04, 2012 4:59 PM
    Saturday, August 04, 2012 4:59 PM

Answers