Skip to main content

Posts

Showing posts with the label Virtualization

UI Virtualization in WPF

How to improve performance using VirtualizingStackPanel, when we want to display large sets of grouped data , The VirtualizingStackPanel stacks elements vertically or horizontally and leverages virtualization to help reduce the number of UI elements created in your screen[window] especially while working with controls like Combo box, List box , List View , Tree View etc. UI elements are generated from a larger number of data based on which items are visible on the screen, if we are loading a huge data in the control there may be a performance issue during loading and navigating. It is intensive both in terms of memory and processor to generate a large number of UI elements when only few are visible on the screen at a given time.
A control that inherits VirtualizingPanel, such as the VirtualizingStackPanel, calculates visible items and works with the ItemContainerGenerator from an ItemsControl to only create UI elements for visible items, the VirtualzingStackPanel can determine which it…