Say I have a grid named ‘GridA’
everywhere i’ve searched suggests that i use
GridA.DrawToBitmap
But grids don’t have that method..
And then i got crafty and wrapped it in a stackpanel and called ‘stackpanel1’
panels don’t have that method either.
So how should i go about saving my grid as an image in wpf ?
You can convert any Drawing Visual into a Bitmap. Here’s some code I use to add icon overlays from WPF drawn controls, add it to a UserControl or refactor it.
For a full example see http://alski.net/post/2012/01/11/WPF-Icon-Overlays.aspx