c# - SemanticZoom ZoomedOutView SelectedItems 返回 DependencyObject

标签 c# .net windows-8 winrt-xaml

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

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

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

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

最佳答案

您将依赖对象转换为 ICollectionViewGroup它具有 GroupGroupItems 属性。

关于c# - SemanticZoom ZoomedOutView SelectedItems 返回 DependencyObject,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11493652/

相关文章:

c# - SignalR : notifying progress of lengthy operation from ASP. NET Core Web API 到 Angular 7 客户端

c# - 将具有命名过滤器的ElasticSearch聚合查询转换为NEST C#

c# - n个连续整数的随机排列

c# - XmlTextWriter 错误地写入控制字符

windows - C :\Progra~2 not working in OEM Version of Windows 8

c# - 添加到 Authorization c# API 的 header

c# - MsChart:如何将日历周数显示为 X 轴上的标签?

C# 独立 WebDAV

wpf - Windows8 或 wpf 中的颜色数组?

perl - 在 Windows 8 PowerShell ISE 中运行 Strawberry Perl