ListView column auto sizing

前端 未结 8 1920
执念已碎
执念已碎 2020-12-18 23:28

Let\'s say I have the following ListView:


  
    
            


        
8条回答
  •  醉梦人生
    2020-12-18 23:51

    
                
                    
                    
                    
                    
                    
                
                
                
                
                
                
            
            
                
                    
                        
                            
                                Name
                            
                        
                        
                            
                                Publisher
                            
                        
                        
                            
                                Version
                            
                        
                        
                            
                                Size
                            
                        
                        
                            
                                
                                    
                                
                            
                        
                    
                
            
    

    In the above example i have used a dummy grid and split into 5 columns and using binding assign that size to "GridViewColum" by

    Width="{Binding ElementName=dummywidth4, Path=ActualWidth}"

    So that when the hidden dummy grid column size changes it will get reflect in gridview column size also.

提交回复
热议问题