How to get Items count from CollectionViewSource?

后端 未结 6 678
鱼传尺愫
鱼传尺愫 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:25

    You could also do _viewSource.View.Cast().Count() for the filtered list and _viewSource.View.SourceCollection.Cast().Count() for the original.

    提交回复
    热议问题