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

后端 未结 3 1835
北海茫月
北海茫月 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 23:16

    In my case I had a list of enums that had to be converted and then ordered. My code ended up looking like this with the help of the other answers.

    
        
            
                        
    
    

提交回复
热议问题