silverlight - W7P ListBox doesn't stay scrolled in the emulator -
i have listbox in xaml page windows phone 7 app. starts out empty, populate items once retrieved web service. far works fine - items show in list , seems fine. problem have when try drag list scroll bottom (in emulator): can scroll down, release mouse button list springs top though hadn't scrolled @ all. insights why behave way?
<grid x:name="contentpanel" grid.row="2" margin="0,0,0,0" canvas.zindex="0"> <grid.rowdefinitions> <rowdefinition height="auto"/> <rowdefinition height="auto"/> <!-- edit: problem "auto" here should have been "*" --> </grid.rowdefinitions> <!-- removed other element brevity --> <listbox name="infoboardlistbox" grid.row="1" selectionchanged="infoboardlistbox_selectionchanged" margin="0,0,0,0" fontsize="26.667" /> </grid> and method populates list:
foreach (infoboard entry in boards.values) { item = new listboxitem(); item.content = entry.name; item.name = entry.id.tostring(); //used tell entry clicked infoboardlistbox.items.add(item); }
try setting height of second row * instead of auto; think it's size listbox thinks vs. available space.
Comments
Post a Comment