问题
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