If you have a large number of items to include in a WPF or Silverlight WrapPanel, then the latest version of BinaryVirtualizingWrapPanel could solve your problem with hardly any effort on your part.
VirtualizingWrapPanel.NET is part of Binarymission's newly updated UIControlSuite .NET, a collection of 41 controls for WinForms, WPF, and Silverlight (supporting both Silverlight versions 3.0 and 4.0).
It differs from the standard wrap panel in that it provides a viewport onto a much larger "virtual" panel, allowing the user to scroll to view more items with two orientations, horizontal and vertical.
The control automatically works out the number of elements that will be displayed in the viewport, and creates the UI element containers for only those elements that will be visible at any given time in the control. It is therefore useful when a large number of elements to be included in a wrap panel.
The online demonstration shows its use with 100,000 objects which should be enough for most applications.
Enhancements in VirtualizingWrapPanel V 3.0 include:
- Support for IEditableCollectionView data sources
- the control's virtualization engine will support the transactional edits to the ItemsControl's items source data, and the control will automatically re-virtualize/realize the contents for rendering in its viewport.
- Support for ICollectionView Filtering and Sorting
- making it capable of dynamic and automatic re-virtualization and realization of child items for re-rendering in the view port, on dynamically filtered and sorted data (for ICollectionView data sources).
- SlideShow enhancements - 15 new slide transitions/effects added
More information on Binarymission's Virtualizing Wrap panel including an interactive demo.