CollectionViewSource在窗口的地铁应用程序 [英] CollectionViewSource in windows metro app

查看:143
本文介绍了CollectionViewSource在窗口的地铁应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个集合,为此我需要3个不同的意见
收集
1.所有数据 2.分组数据(分组标准将在应用程序生命周期进行修改)
3.过滤数据(过滤标准将在应用程序生命周期进行修改)

I have a collection, for which i require 3 different views
1. All data of collection
2. Grouped data (grouping criteria will be modified during application lifecycle )
3. Filtered data (filter criteria will be modified during application lifecycle)

我要的是,所有的意见应结合到同一个集合,使任何更改集合应同步到所有的意见。

What i want is that all views should bind to same collection so that any change to collection should be synced to all the views.

通过WPF,这可以使用 Col​​lectionViewSource <实现/ A>。
在现代的UI应用程序,<一个href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.data.collectionviewsource"相对=nofollow> Col​​lectionViewSource
仍然存在,但能力有限。它不具有SortDescription和FilterDescription。

With WPF, this can be achieved using CollectionViewSource.
In Modern UI apps, CollectionViewSource still exists, but with limited capabilities. It does not have SortDescription and FilterDescription.

如何实现现代用户界面的应用程序集合同步?

How to achieve collection sync in Modern UI apps?

推荐答案

显然,你被要求使用LINQ执行的排序,分组和筛选在WinRT的。该 Col​​lectionViewSource 出现的只提供了一个共同的看法,以控制之间共享。

Apparently, you are asked to perform your sorting, grouping, and filtering with LINQ in WinRT. The CollectionViewSource appears to only provide a common view to be shared between controls.

<一个href="http://social.msdn.microsoft.com/Forums/en-NZ/winappswithcsharp/thread/599432f6-0e28-45de-a4e0-1f105afd081d"相对=nofollow>来源

这篇关于CollectionViewSource在窗口的地铁应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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