Search code examples
c#wpfcontrolsdirectxrendering

Can a DirectX surface be plotted to a WPF control?


Can DirectX be used to plot a set of points on a WPF control (or something that can be used by WPF).

I need to implement a control in WPF that should plot 16k points with an update rate of 30 Hz, and i'm running out of solutions rigth now.

This idea is from a comment in this question.

Any help would be very appreciated.


Solution

  • Yes it can. It's usually quite smooth, because WPF itself is an implementation of DirectX.

    See MS' Greg Schechter blog:

    Redirecting GDI, DirectX, and WPF applications

    You can also have a sample of D3DImage on a surface on WPF from Codeproject: http://www.codeproject.com/KB/WPF/D3DImage.aspx