wpf Listbox giving columns a header

前端 未结 5 616
谎友^
谎友^ 2021-01-12 00:37

I have the following markup (xaml):


                     


        
5条回答
  •  不知归路
    2021-01-12 01:05

    ListBox has no HeaderTemplate. ListView is not the best option because it does not support Width="*" . If you get desperate and go to DataGrid you might be getting a lot more than you need. The solution is to use a HeaderedItemsControl

    Just change the name of the Collection you are binding to and change the binding properties.

    
           
    
    
         
    
            
                
                    
                        
                        
                        
                        
                        
                    
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                
            
    
            
    

提交回复
热议问题