WPF: Alternating colors on a ItemsControl?

后端 未结 3 941
無奈伤痛
無奈伤痛 2020-12-06 04:07

How do I get alternating colors on a ItemsControl? I have AlternationCount set to 2, but the ItemsControl.AlternationIndex property always returns 0.

                


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-06 04:39

    Here is an alternative which may be a bit more general

    
        
            
                
            
            
        
    
    

    Usage:

    
    

提交回复
热议问题