Change selection-color of WPF ListViewItem

后端 未结 4 2154
名媛妹妹
名媛妹妹 2020-12-06 00:39

I have a ListView containing some ListViewItems. By default, selecting items makes their background to some deep blue. I would like to apply a style such that selecting an i

4条回答
  •  既然无缘
    2020-12-06 01:19

    I'm not sure I understand what you mean by white instead of blue. When a ListViewItem is selected the foreground and background is changed by a trigger. To change the foreground of a ListViewItem you can use this

    
        
            
        
        ...
    
    

    Update

    Try this for re-templating. I removed all triggers for selected

    
        
            
        
    
    

提交回复
热议问题