/ Published in: C#
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 Rect bounds = VisualTreeHelper.GetDescendantBounds(canvas); double dpi = 96d; RenderTargetBitmap rtb = new RenderTargetBitmap((int)bounds.Width, (int)bounds.Height, dpi, dpi, System.Windows.Media.PixelFormats.Default); using (DrawingContext dc = dv.RenderOpen()) { } rtb.Render(dv);
Comments
                    Subscribe to comments
                
                