WPF,DataGrid怎么设置列标题分割线的颜色

2025-01-02 18:47:16
推荐回答(2个)
回答1:

首先查看datagrid的视觉树
我想你要设置的是两个thumb控件,要设置这个的话,有两种方法
一、到datagrid的模板中直接修改,然后datagrid应用这个资源样式
二、后台去遍历datagrid的视觉树,找到这个控件再去修改

回答2:


            
            
                
                    
                        
                            
                                
                                
                                    
                                    
                                    
                                
                            

                                                           Cursor="SizeWE"  HorizontalAlignment="Right" >
                            
                                                           Cursor="SizeWE" 
                            HorizontalAlignment="Right" >
                            
                        

                       
                    
                

            
        

注意两个Thumb