How to get Items count from CollectionViewSource?

后端 未结 6 680
鱼传尺愫
鱼传尺愫 2021-01-17 09:19

I am using CollectionViewSource to filter the records displayed in a ListBox. The xaml follows.

   

        
6条回答
  •  一生所求
    2021-01-17 09:49

    If you're doing MVVM, you could have your VM create a collection view rather than one being created on your behalf by the CollectionViewSource. Then, you have control over what type of CVS is created, so you can create a ListCollectionViewSource, which has a Count property. It really depends on the properties of the data you're filtering.

提交回复
热议问题