I have a ListView
with different complex ListViewItem
containers consisting of images, shadow effects, blur effects.. etc. Rendering these containers in large amounts heavily reduces performance, especially since i'm using a blur overlay frame on top of the ListView
. Which is why in this case i'm setting CacheMode
to BitmapCache
(improves performance by up to 15x the fps).
<Border.CacheMode>
<BitmapCache />
</Border.CacheMode>
The problem is that i use a WrapPanel
and a ValueConverter
to dynamically resize and fit these containers into the WrapPanel
so that they completely fill the space in either horizontal or tile views. Apparently, that doesn't work well with caching and it produces severe lags/stalls (frame drops to 0).
Currently my 3 options are:
- Disable caching (and live with almost 15fps)
- Disable resizing (looks unacceptable)
- Disable caching and resizing only when resizing window (still performs bad but it's the best option i have)
My questions:
- Why do i get these huge drops in performance while resizing with caching vs without caching?
- Am i misusing caching or doing it wrong?
- Is there a better way of fixing this mess without compromises?