How Can I Improve Application Performance When Add Thousands of Child Control in Container?

26 Views Asked by At

I created a custom ComboBox with following elements:

  1. ComboBoxItem: Consist of A) PicttureBox to show image for each item B) Label to show item text. Both control located in UserControl to create ComboBoxItem.
  2. ComboBox: when user click on DownArrow, the following steps occure: 1) Create an instance of Form 2) Create an instance of FlowLayoutPanel 3) In a foreach statement, for each item I create an instance of ComboBoxItem then add to FlowLayoutPanel.

Problem : For 50 to 100 items everything is ok, but more than 100 or 200, my ComboBox open items with delay and scrolling items is done slowly. How can I improve performance in my custom ComboBox to load more items?

thank you all

0

There are 0 best solutions below