c# - ListView.ScrollIntoView doesn't work properly -
i have listview
in page. select row , scroll listview
. selecteditem
goes out of visible area. when call listview.scrollintoview( selecteditem)
jumps row content of row wrong , it filled last row visible when scrolled.
it in xaml
<listview name="lstsurahtext" selectedvaluepath="tblsuyaid" showsscrollingplaceholders="false" > <listview.itemtemplate> <datatemplate> <grid> <grid.columndefinitions> <columndefinition width="10*"/> <columndefinition width="*"/> </grid.columndefinitions> <stackpanel> <contentcontrol content="{binding rtb}" /> <textblock text="{binding text}" textwrapping="wrap" /> </stackpanel> </grid> </datatemplate> </listview.itemtemplate> </listview>
and yhis in code behind:
lstsurahtext.scrollintoview(lstsurahtext.selecteditem);
anyone knows why? , how solve it?
update:
i understand contentcontrol make work wrong, don't know why.
Comments
Post a Comment