wpf-rule-virtualization-patterns — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited wpf-rule-virtualization-patterns (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
UI virtualization rules for WPF controls that display large collections.
Plain ItemsControl does not virtualize by default — it materializes every item at load. For large collections, replace the default panel with VirtualizingStackPanel and enable container recycling.
<!-- Wrong: no virtualization, all items materialized at once -->
<ItemsControl ItemsSource="{Binding LargeCollection}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl><!-- Correct: VirtualizingStackPanel with recycling -->
<ItemsControl ItemsSource="{Binding LargeCollection}"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.VirtualizationMode="Recycling"
VirtualizingPanel.ScrollUnit="Pixel"
ScrollViewer.CanContentScroll="True">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>ListView and ListBox use a VirtualizingStackPanel by default, but the optimal settings must still be set explicitly via attached properties:
<ListView ItemsSource="{Binding LargeCollection}"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.VirtualizationMode="Recycling"
VirtualizingPanel.ScrollUnit="Pixel"
ScrollViewer.CanContentScroll="True">
...
</ListView>| Attached Property | Recommended Value | Effect |
|---|---|---|
VirtualizingPanel.IsVirtualizing | True | Enable UI virtualization |
VirtualizingPanel.VirtualizationMode | Recycling | Reuse containers instead of re-creating |
VirtualizingPanel.ScrollUnit | Pixel | Smooth pixel scrolling (vs. item-by-item) |
ScrollViewer.CanContentScroll | True | Required for panel-level virtualization |
VirtualizationMode="Recycling" is almost always preferred over Standard — it avoids GC pressure from container creation/destruction during scroll.ScrollUnit="Pixel" eliminates the "jumping" effect that occurs with item-based scrolling when items have variable height.ScrollViewer wrapping the items panel has CanContentScroll="False" — always verify this setting.VirtualizingStackPanel inside an ScrollViewer with unconstrained height — it will lose virtualization because all items become "visible".~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.