How to change column header's background color when using WPF datagrid

后端 未结 6 511
遥遥无期
遥遥无期 2020-12-13 09:24

How to change column header\'s background color when using WPF datagrid? Need to modify xaml directly?

6条回答
  •  天涯浪人
    2020-12-13 09:51

    I found out that for me, it is not possible to change only background color without loosing other styles (paddig/borders/...)

    So i wrote some style which is simillar to original in: aero2.normalcolor.xaml

    Style contains mouseover, press and sort effect

    Here is result

    You can also create your own colors

        
        
            
            
        
        
            
            
        
        
            
            
            
        
        
            
            
            
        
        
            
            
            
        
        
        
        
        
        
        
        
    

    Using:

    
    

提交回复
热议问题