in wpf listbox some-more 1000 settlement equipment wizz images spin slow


i met problem deveoping imitation spectator application.
i listbox arrangement images, contained observablecollection.
i bond listbox's itemssource observablecollection.



  <datatemplate datatype="{x:type modeldata:imageinfo}">
<image
margin="6"
source="{binding thumbnail}"
width="{binding zoombarwidth.width, source={staticresource zoombarmanager}}"
height="{binding zoombarwidth.width, source={staticresource zoombarmanager}}"/>
</datatemplate>

<grid datacontext="{staticresource imageinfolder}">
<scrollviewer
verticalscrollbarvisibility="auto"
horizontalscrollbarvisibility="disabled">
<listbox name="photoslistbox"
issynchronizedwithcurrentitem="true"
style="{staticresource photolistboxstyle}"
margin="5"
selectionmode="extended"
itemssource="{binding}"
/>
</scrollviewer>


i also bond image'height listbox slider.(the slider's value also bond zoombarmanager.zoombarwidth.width).
but i found collection spin larger, such as: contains some-more following 1000 images, i slider change distance iamges, spin bit slow.
my doubt is.
1. since spin slow? spin tries wizz each images,or only since notify("width") invoked some-more 1000 times.
2. there any slight solve kind problem faster.



the photolistboxstyle this:



    <style~~ targettype="{x:type listbox}" x:key="photolistboxstyle">
<setter property="foreground" value="white" />
<setter property="template">
<setter.value>
<controltemplate targettype="{x:type listbox}" >
<wrappanel
margin="5"
isitemshost="true"
orientation="horizontal"
verticalalignment="top"
horizontalalignment="stretch" />
</controltemplate>
</setter.value>
</setter>
</style~~>


but i impression above, i have scrollviewer outmost listbox, differently i have thought well-spoken scrolling scrollerbar wrappanel seems have default scrollerbar. anyone help? conspicuous listbox scrollviewer bad performance.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?