wpf - ReactiveUi how to use ICollectionView with the Getting started example
问题描述
I'm learning ReactiveUi and trying the sample from here https://reactiveui.net/docs/getting-started/ This is a great examle, but now I would like to replace the List SearchResults with a ICollectionView to have more grouping / sorting capability.
The documentation contains a ReactiveCollectionViewSource here and but I'm unable to find a sample how to use it with the starting code. Is that the right track?
解决方案
The ReactiveCollectionViewSource is for the iOS project only.
You should be able to use standard WPF ways of generating your CollectionView and use CollectionViewSource.GetDefault() etc.
You can then use WPF or ReactiveUI bindings to bind that to your controls.
One thing of note is that DynamicData is going to be in the near future the preferred solution for data management in RxUI projects. Worth seeing if it fits in your problem 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
推荐阅读
- flutter - 在bottomNavigationBar下方显示bottomSheet
- azure - 通过 Release/CD 导入 AppInsight Instrumentation Key 并在应用程序的 appsettings 中更新 Instrumentation 密钥
- java - 如何在java中设置没有身份验证的smtp服务器
- java - Android允许用户在地图上只选择公交车站
- android - 听众在我的片段中不起作用
- javascript - 如何创建二维数组?
- swift - 无法使用 UserDefaults (Swift) 让欢迎 ViewController 仅显示一次
- database - 数据库系统实现演示项目
- c - 客户端经过的时间不起作用 TCP SOCKET
- java - 使用 Java8 映射到列表