WPF: Virtualization Panel

VirtualizingPanel is a base class which adds specialization to allow UI Virtualization.

UI Virtualization is a concept where UI Elements are only created and maintained when they are visible on the screen. It is particularly meaningful when displaying a large list of items, such as the content of a database.

The concept of UI Virtualization in WPF is currently only implemented in the ItemsControl base class. To accomplish proper UI Virtualization, the ItemsControl class relies on the ItemContainerGenerator interface/class. When used in conjunction with a virtualizing Panel, the ItemContainerGenerator allows UI elements to be created and destroyed as they are required.

Example: Lets consider a 50,000-entry database: populating a ListBox with 50,000 UI Elements would have extremely low performance. Instead, by virtualizing all elements that are not visible (scrolled outside of view), only a small subset of the 50,000 entries needs to be created and maintained.