rendering-wpf-high-performance
Installation
SKILL.md
High-Performance WPF Rendering
Quick Reference
| Technique | Use Case | Performance |
|---|---|---|
| DrawingVisual | 1K-100K shapes | 10-50x faster than Shape |
| WriteableBitmap | Pixel manipulation, heatmaps | Fastest for raw pixels |
| CompositionTarget.Rendering | Game loops, real-time animation | ~60 FPS frame callback |
| BitmapCache | Complex static visuals | GPU texture caching |
1. DrawingVisual Pattern
Lightweight visual for high-volume rendering without layout overhead.
public class ChartVisual : FrameworkElement
{
private readonly VisualCollection _visuals;