Efficient WPF drawing code
WPF
1
Posts
1
Posters
0
Views
1
Watching
-
I am writing custom drawing code by overriding the OnRender function of a Canvas window. protected override void OnRender(DrawingContext drawingContext) { base.OnRender(drawingContext); // bunch of drawing code } The window that I'm drawing stretches very far in the vertical direction, so I contain it in a ScrollViewer. When data changes in the system, I want to redraw just the small portion of the window that represents that data, not the entire window. However, I can't seem to figure out how to invalidate a region of the window. I am currently invalidating, and redrawing the entire window. Help! Thanks, Aaron