xaml - ListView moving left and right while scrolling -
i have following listview:
<listview itemssource="{binding artistlist}"> <listview.itemtemplate> <datatemplate> <border borderthickness="0,0,0,0.5" borderbrush="#22ffffff" tapped="artisttapped"> <grid> <grid.columndefinitions> <columndefinition width="auto"/> <columndefinition width="*"/> </grid.columndefinitions> <ellipse grid.column="0" canvas.zindex="0" fill="#22ffffff" width="50" height="50" margin="0,10"/> <ellipse grid.column="0" canvas.zindex="1" stretch="uniformtofill" width="50" height="50" margin="0,10"> <ellipse.fill> <imagebrush imagesource="{binding firstalbumart}"/> </ellipse.fill> </ellipse> <stackpanel grid.column="1" margin="20,10,0,10"> <textblock text="{binding name}" foreground="#ffffffff" fontfamily="segoe wp" fontsize="18"/> <textblock foreground="#aaffffff" fontfamily="segoe wp" fontweight="light" fontsize="14"> <run text="{binding amountofalbums}"/> <run text="album(s)"/> </textblock> </stackpanel> </grid> </border> </datatemplate> </listview.itemtemplate> <listview.itemcontainerstyle> <style targettype="listviewitem"> <setter property="horizontalcontentalignment" value="stretch" /> </style> </listview.itemcontainerstyle> </listview>
when scroll , down, listview moves right , left, irritating. there 2 ways fix this:
removing itemcontainerstyle => items aren't stretched anymore necessary
adding horizontalalignment = left listview => again, items aren't stretched anymore...
is there way keep listview jumping left , right while maintaining stretched listviewitems?
it's bug in current os due virtualisation in listview.
the best solution far found giving items in list actual width matches parent.
it has been discussed on stack overflow here : https://stackoverflow.com/questions/24361850/listview-in-windows-phone-8-1-wobbles-while-scrolling-though-long-list-xaml/24400075#24400075
Comments
Post a Comment