How do you sort a CollectionViewSource by one property, then by another as a tiebreak?

后端 未结 3 1823
北海茫月
北海茫月 2021-01-07 22:35

Currently, my CollectionViewSource sorts a collection of items by description. If the description is the same, I want to sort based on ID. How can I specify to sort by descr

3条回答
  •  没有蜡笔的小新
    2021-01-07 22:53

    @sa_ddam213's answer should work, but you don't need the extra ToString()method; all you need to add to your XAML is to turn IsLiveFilteringRequested on, at least as in the .Net Framework 4.5.1.

    
        
            
            
        
    

提交回复
热议问题