I need to add controls into a panel and save it to bitmap. Is DrawToBitmap obsolete?
How can I to do it with Canvas? May you help me, please?
Public Class Page1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim bmp As Bitmap = New Bitmap(Panel1.ClientSize.Width, Panel1.ClientSize.Height)
Dim Botao As New Wisej.Web.Button
Botao.Left = 0
Botao.Top = 0
Botao.BackColor = Color.Red
Botao.Text = “Teste”
Botao.Visible = True
Wisej controls are HTML widgets. There is no drawing to bitmap supported by any browser.
You can try the Html2Canvas extension. It lets you “capture” an image rendering of a specific control or of the entire page. It also works with async code.
Please login first to submit.