开发者

Is it possible to apply a filter on an items collection in the binding

开发者 https://www.devze.com 2023-02-21 19:18 出处:网络
I understand how easy it is开发者_运维百科 to apply a filter to something like a PagedCollectionView and then bind an ItemsSource to that.Howerver in this case, I would like to bind a ComboBox to a St

I understand how easy it is开发者_运维百科 to apply a filter to something like a PagedCollectionView and then bind an ItemsSource to that. Howerver in this case, I would like to bind a ComboBox to a StaticResource, but filter it based on a value in the ViewModel. Is this sort of thing possible / practical?


possible, yeah - but why use staticresource if you're doing MVVM? why is it not part of the ViewModel completely? if it's sorted by the VM, then it should also be hosted by the VM. otherwise it rather feels like you're crossing layer - boundries.

0

精彩评论

暂无评论...
验证码 换一张
取 消