Skip to content

How to create a new filtered collection when the source collection's property changed? #872

Answered by JakenVeina
Snailya asked this question in Q&A
Discussion options

You must be logged in to vote

So, you need an IObservable<bool> that is true when there is at least one item in the set that is selected?

Pull the DynamicData.Aggregations namespace and do...

items
    .FilterOnObservable(static item => item.WhenPropertyChanged(x => x.IsChecked))
    .IsNotEmpty();

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Snailya
Comment options

Answer selected by Snailya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants