开发者

High performance plot control in WPF

I am doing some work for which I need to develop a control, it should be a simple graph that shows several points and two edges.

My problem is that I need to show up to 16k points, with an update rate of 30 Hz. Has anyone done something similar?, and has any advice?.

For example whether to inherit from FrameworkElement or Control (ItemsControl in this case). If the control inherits from FrameworkElememt it may have a better perfor开发者_如何学Cmance drawing the points in the OnRender method but I would miss the Templating feature that comes from inheriting from Control.

Or does there exist another control that can do this out there?

Thanks in advance for your time.


I ended up using InteropBitmap, it is the fatest bitmap rendering class from WPF.

It allows you to map the image that you want to paint (in memory) and then reder it as a Image. This was perfect as i needed to plot points on the screen.

I got great performance (almost 50Hz for 20k points), i also use PLINQ to update the points in memory.

check this article for more details...


Try and read about ZoomableCanvas. I believe it can solve your problem. You can render all the points as small rectangles/ellipses inside the ZoomableCanvas.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜