Windows phone 8.1 Implement virtualization for Custom variable sized Gridview

时光怂恿深爱的人放手 提交于 2019-11-29 18:07:42

To overcome out of memory exception just reduce the pixel width of the images and you will save the memory so that more items can be loaded in the page.

<Image Stretch="Uniform" Width="150" Height="170">
                        <Image.Source>
                            <BitmapImage UriSource="{Binding MainImage}" DecodePixelWidth="400"/>
                        </Image.Source>
                    </Image>

The above code does the trick.

Finally we implemented virtualized custom grdiview by referring to the code posted in this link. Code given in the link is for virtualizing horizontal gridview. I changed the code a bit to change it to vertical gridview. Many thanks to the person who posted the code. It helped a lot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!