protected void PerformHtmlLayout() { if (_htmlContainer != null) { _htmlContainer.MaxSize = new SizeF(ClientSize.Width - Padding.Horizontal, 0); var g = RendererFactory.FromControl(this) as SkRenderer; if (g != null) { using (g) { _htmlContainer.PerformLayout(g); // using (var image = g.Surface.Snapshot()) // using (var data = image.Encode(SKEncodedImageFormat.Png, 100)) // using (var mStream = new MemoryStream(data.ToArray())) // { // var bm = new Bitmap(mStream); // this.Image = bm; // } } } } }