[英]Is there any way of unregister a longlistmultiselector from an ObservableCollection?
I have an app with a list of photos on an ObservableCollection. 我有一个应用程序,其中包含ObservableCollection上的照片列表。 I'm using that list as source for longlistmultiselectos on diferent views.
我将该列表用作不同视图上longlistmultiselectos的源。
Now I realize that the views that use that ObservableCollection are not garbage collected and each time the user navigates to a new view it is created again despite it is on memory or not. 现在,我意识到使用ObservableCollection的视图不会被垃圾收集,并且每次用户导航到新视图时,无论它是否在内存中,都会再次创建该视图。
I think it is because the ObservableCollection is keeping a reference to the view. 我认为这是因为ObservableCollection保留了对该视图的引用。
How can I broke that reference? 我怎样才能打破那个参考? Is there another aproach to this problem.
有没有解决这个问题的方法。
Thank you very much. 非常感谢你。 Sorry for my english.
对不起我的英语不好。
将LongListMultiSelector的ItemSource属性设置为null将中断此循环。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.