SemanticZoom ZoomedOutView SelectedItems返回DependencyObject的 [英] SemanticZoom ZoomedOutView SelectedItems Returns DependencyObject

查看:148
本文介绍了SemanticZoom ZoomedOutView SelectedItems返回DependencyObject的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SemanticZoom控制我用同样的 Col​​lectionViewSource 同时为放大和缩小视图。要做到这一点,我绑定缩小的GridView 在code的背后是这样的:

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;

一切按预期工作。不过,现在的缩小GridView控件绑定到DependencyObjects,而不是我原来的组的列表。就这样,当我访问SelectedItems我得到一个包含DependencyObjects,而不是我的组列表的WinRT的对象。

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.

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

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

推荐答案

您投的依赖对象到<一个href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.data.icollectionviewgroup.aspx"相对=nofollow> ICollectionViewGroup 具有属性的集团 GroupItems 的。

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

这篇关于SemanticZoom ZoomedOutView SelectedItems返回DependencyObject的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆