ListView item is always at 44px RRS feed

  • Question

  • So i have a listview:

    <div id="ListV" style="height:100%;" data-win-control="WinJS.UI.ListView" data-win-options="{ layout: { type: WinJS.UI.ListLayout }}">

    And a Template:

    <div id="Template" data-win-control="WinJS.Binding.Template" style="margin:10px;">
                    <div style="text-align:right;">
                        <span data-win-bind="innerText: Number" style="font-size:x-large;color:rgb(99, 127, 137);" ></span>
                        <span id="AT"  data-win-bind="innerText: Text" style="font-size:xx-large;color:purple;" ></span>

    And some Code:

    ListV.winControl.itemDataSource = arr.dataSource;
    ListV.winControl.itemTemplate = Temp;

    But ever time, the height of an item of the listview is always 44px. The problem is, sometimes the Text is only one line and sometime its 30 lines, so the height is dynamic. I want it to be the size of the text. Why does it always choose a height of 44px? 

    Saturday, October 20, 2012 5:54 PM


All replies