ReactiveUi 如何使用 ICollectionView 与入门示例

ReactiveUi how to use ICollectionView with the Getting started example

我正在学习 ReactiveUi 并从这里尝试示例 https://reactiveui.net/docs/getting-started/ 这是一个很好的例子,但现在我想用 ICollectionView 替换 List SearchResults 以获得更多的分组/排序功能。

文档包含一个 ReactiveCollectionViewSource here,但我找不到如何将其与起始代码一起使用的示例。那是正确的轨道吗?

ReactiveCollectionViewSource 仅适用于 iOS 项目。

您应该能够使用标准 WPF 方式生成 CollectionView 并使用 CollectionViewSource.GetDefault() 等。

然后您可以使用 WPF 或 ReactiveUI 绑定将其绑定到您的控件。

需要注意的一点是,DynamicData 将在不久的将来成为 RxUI 项目中数据管理的首选解决方案。值得一看它是否适合您的问题 space。 https://github.com/RolandPheasant/DynamicData - There is a DynamicData channel on the Reactive slack channel if you need help with the framework https://reactiveui.net/slack