SemanticZoom ZoomedOutView SelectedItems Returns DependencyObject

大憨熊 提交于 2019-12-08 03:31:25

问题


In the SemanticZoom control I use the same CollectionViewSource for both the zoomed in and zoomed out view. To do this I bind the zoomed out GridView in the code behind like this:

(FavoriteGroupsSemanticZoom.ZoomedOutView as ListViewBase).ItemsSource = this.FavoriteGroupsViewSource.View.CollectionGroups;

Everything works as expected. However, now the zoomed out GridView is bound to a list of DependencyObjects instead of my original groups. And thus when I access the SelectedItems I get a WinRT object that contains a list of DependencyObjects instead of my groups.

How can I access the selected groups of the zoomed out GridView?


回答1:


You cast the Dependency Object to an ICollectionViewGroup which has the properties Group and GroupItems.



来源:https://stackoverflow.com/questions/11493652/semanticzoom-zoomedoutview-selecteditems-returns-dependencyobject

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