WPF ComboBox performance problems by binding a large collections

前端 未结 3 1750
無奈伤痛
無奈伤痛 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 09:56

    According to this blog: http://vbcity.com/blogs/xtab/archive/2009/12/15/wpf-using-a-virtualizingstackpanel-to-improve-combobox-performance.aspx

    I've tested it with this code:

    
        
            
                
            
        
    
    

    It works fine for first time and next times. It's not necessary to code these lines:

    
    

    I hope this helps you.

提交回复
热议问题