SemanticZoom ZoomedOutView SelectedItems返回DependencyObject

在SemanticZoom控件中,我对放大和缩小视图使用相同的CollectionViewSource 。 为此,我在后面的代码中绑定缩小的GridView ,如下所示:

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

一切都按预期工作。 但是,现在缩小的GridView绑定到DependencyObjects列表而不是原始组。 因此,当我访问SelectedItems时,我得到一个WinRT对象,其中包含DependencyObjects而不是我的组列表。

如何访问缩小的GridView的选定组?

您将Dependency Object转换为具有GroupGroupItems属性的ICollectionViewGroup 。