The point is, that I need to convert to a System.Drawing.Bitmap (.Net Framework 2.0) to get a single frame of an WPF Grid with its content.
I read about VisualBrush
and DrawingBrush
but I cannot imagine how it should work.
I can convert any WPF BitmapSource
into my System.Drawing.Bitmap
successfully. But how to receive the BitmapSource
from my Grid?
Thanks
To convert a
Visual
toBitmapSource
you can useRenderTargetBitmap
,VisualBrush
andDrawingVisual
: