c# - How to prevent the inner ListBox's scrolling in nested ListBoxes? (WP8) -


i have nested listboxes:

<listbox name="listbox" padding="0,0,0,100" loaded="listbox_loaded" foreground="black">     <listbox.itemtemplate>         <datatemplate>             <stackpanel orientation="vertical">                 <textblock text="{binding name}" fontsize="30" fontweight="bold"/>                 <listbox itemssource="{binding categories}" foreground="black">                     <listbox.itemtemplate>                         <datatemplate>                             <textblock text="{binding name}"/>                          </datatemplate>                     </listbox.itemtemplate>                 </listbox>             </stackpanel>         </datatemplate>     </listbox.itemtemplate> </listbox> 

when touch , drag items inner listbox plays scroll animation inner listbox. how prevent behavior? need scroll outer listbox only, items inner listbox still must selectable.

thank you!

try change template of inner listbox itemspresenter. remove scrollviewer part of template:

<listbox itemssource="{binding categories}" foreground="black">     <listbox.template>         <controltemplate targettype="listbox">             <itemspresenter/>         </controltemplate>     </listbox.template>     <listbox.itemtemplate>         <datatemplate>             <textblock text="{binding name}"/>         </datatemplate>     </listbox.itemtemplate> </listbox> 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

angularjs - ng-repeat duplicating items after page reload -