Hi guys!
I'm using WPF and C#.
I have a problem. I need to create a lot of bindable templated controls in scrollable area (they are all of different types). For example 1000 textboxes, 1000 drop down lists, and 1000 checkboxes.
The problem is that when they are all created it works really slow.
The question is - whether it is possible to have so many controls simultaniously without lags and in what direction should I search for the solution? I'd like to save an ability to use Templates, Databinding and simple event handling like mouse clicking.
P.S. I tried lot's of things (rendering of geometry only, different base classes and so on) but currently the only approach that seems working for me (i haven't tried it yet) is to create only those controls that fit into the current viewport and update this list of controls on scrolling.
P.P.S I know that there is a mechanism in 3.5 SP1 that is used in ListBox when list items are reused during scrolling but such approach cannot be used here because all those items are of different types.
Thank's a lot.