WPF ComboBox performance problems by binding a large collections

前端 未结 3 1754
無奈伤痛
無奈伤痛 2020-12-04 09:24

I\'m trying to bind a large collection to a ComboBox and I faced performance problems when opening ComboBox\'s popup. I searched internet and found that using VirtualizingSt

3条回答
  •  一向
    一向 (楼主)
    2020-12-04 10:00

    I just ran into this issue as well. I'm using this code in a custom combo box with a style template. When I ran my code in VS debugging mode the virtualization did not work properly. Once I ran it outside of debugging I can switch the content of the ObservableCollection without locking the UI up. It also might help if you set a max height and max width.

     
    
    
    
    
        
        
          
         
      
    
    

提交回复
热议问题