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

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -