1

I'm new to directX and I need to saving a WPF-Canvas as bitmap using DirectX (sharpDX).

I used the following code to get handle of my canvas:

         IntPtr source;
            HwndSource hwndSource = (HwndSource)PresentationSource.FromVisual(myCanvas);
            using (Graphics graphicsFromVisual = Graphics.FromHwnd(hwndSource.Handle))
            {
                              source = graphicsFromVisual.GetHdc();

                   // ?                       
            }

how can I save my WPF-Canvas as bitmap (by device context handle) using sharpDX. (the fastest way)

Maria
  • 344
  • 8
  • 30

0 Answers0