I would like a simple description of how to implement a virtualizingstackpanel for an ItemsControl
that is databound to an ObservableCollection
in my MVVM.
I have an ItemsControl
instance for each tab in a tab control, and switching tabs becomes VERY slow when the ItemsControl
grows larger.
What can I do to speed up the app?
I opened up a WPF profiler and saw that each element (which is a custom user control) displayed in my ItemsControl of each tab had its own ContentPresenter
. So I essentially had 100 content presenters all running for 100 items in my ObservableCollection
in MVVM. Is this corrrect? How can I optimize?