Custom Painting
Custom painting and drawing in the browser.
Last updated
Custom painting and drawing in the browser.
Last updated
All Wisej controls support custom painting. Simply attach to the Paint event and draw whatever you like, it will display in the browser as the background of the control.
You can't use the BackgroundImage and custom painting. Painting will take over the backgound.
There is no limit to what you can draw: e.Graphics is a GDI+ object that Wisej sends back to the browser as a png image and immediately removes from memory.
In addition to being able to paint any control, Wisej also provides a Wisej.Web.Canvas control that implements the full HTML5 canvas specification on the server.
Use the Redraw event to plug in your drawing code.
This code
Produces this circle.
All the HTML5 Canvas method are available in C# or VB.NET on the server. All the arguments are the same and the names are the same. The only different is that the first character is uppercase and the radians are degrees for simplicity.
The Canvas control allow you to build very sophisticated custom controls using the <canvas> element and drawing the control entirely in .NET.
The ProgressCircle control is entirely created in .NET using the Canvas control.