Skip to main content
Version: 3.5

Canvas

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

Represents the HTML5 canvas element.

public class Canvas : Control, IWisejHandler

Constructors​

Instance memberCanvas()​

Initializes a new instance of the Canvas class.

Properties​

Instance memberBorderStyle​

BorderStyle: Indicates the border style for the control.

Instance memberFillStyle​

Object: Sets or returns the color, gradient, or pattern used to fill the drawing.

Instance memberGlobalAlpha​

Single: Sets or returns the current alpha or transparency value of the drawing.

Instance memberGlobalCompositeOperation​

CanvasCompositeOperation: Sets or returns how a new image are drawn onto an existing image.

Instance memberLineCap​

CanvasLineCap: Sets or returns the style of the end caps for a line.

Instance memberLineDashOffset​

Single: Sets or returns the type of corner created, when two lines meet.

Instance memberLineJoin​

CanvasLineJoin: Sets or returns the type of corner created, when two lines meet.

Instance memberLineWidth​

Int32: Sets or returns the current line width, in pixels.

Instance memberLiveUpdate​

Boolean: Turns live update mode on or off. When live update is on, all canvas calls are pushed to the client immediately, when is off (default) the control updates the client at the end of the request.

Instance memberMiterLimit​

Int32: Sets or returns the maximum miter length.

Instance memberShadowBlur​

Int32: Sets or returns the blur level for shadows.

Instance memberShadowColor​

Color: Sets or returns the color to use for shadows.

Instance memberShadowOffsetX​

Int32: Sets or returns the horizontal distance of the shadow from the shape.

Instance memberShadowOffsetY​

Int32: Sets or returns the vertical distance of the shadow from the shape.

Instance memberStrokeStyle​

Object: Sets or returns the color, gradient, or pattern used for strokes.

Instance memberTextAlign​

CanvasTextAlign: Sets or returns the current alignment for text content, according to the anchor point.

Instance memberTextBaseline​

CanvasTextBaseline: Sets or returns the current text baseline used when drawing text.

Instance memberTextFont​

Font: Sets or returns the current font properties for text content on the canvas.

Methods​

Instance memberArc(x, y, radius, startAngle, endAngle, counterClockwise)​

Creates an arc/curve (used to create circles, or parts of circles).

ParameterTypeDescription
xInt32The x-coordinate of the center of the circle.
yInt32The y-coordinate of the center of the circle.
radiusInt32The radius of the circle.
startAngleSingleThe starting angle, in degrees.
endAngleSingleThe ending angle, in degrees.
counterClockwiseBooleanSpecifies whether the drawing should be counterclockwise or clockwise. Default is false.

Instance memberArc(location, radius, startAngle, endAngle, counterClockwise)​

Creates an arc/curve (used to create circles, or parts of circles).

ParameterTypeDescription
locationPointThe x-coordinate and y-coordinate of the center of the circle.
radiusInt32The radius of the circle.
startAngleSingleThe starting angle, in degrees.
endAngleSingleThe ending angle, in degrees.
counterClockwiseBooleanSpecifies whether the drawing should be counterclockwise or clockwise. Default is false.

Instance memberArcTo(x1, y1, x2, y2, radius)​

Creates an arc/curve between two tangents on the canvas.

ParameterTypeDescription
x1Int32The x-coordinate of the first tangent.
y1Int32The y-coordinate of the first tangent.
x2Int32The x-coordinate of the second tangent.
y2Int32The y-coordinate of the second tangent.
radiusInt32The radius of the arc

Instance memberArcTo(location1, location2, radius)​

Creates an arc/curve between two tangents on the canvas.

ParameterTypeDescription
location1PointThe x-coordinate and y-coordinate of the first tangent.
location2PointThe x-coordinate and y-coordinate of the second tangent.
radiusInt32The radius of the arc

Instance memberBeginPath()​

begins a path, or resets the current path.

Instance memberBezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y)​

Adds a point to the current path by using the specified control points that represent a cubic Bézier curve.

ParameterTypeDescription
cp1xInt32The x-coordinate of the first Bézier control point.
cp1yInt32The y-coordinate of the first Bézier control point.
cp2xInt32The x-coordinate of the second Bézier control point.
cp2yInt32The y-coordinate of the second Bézier control point.
xInt32The x-coordinate of the ending point.
yInt32The y-coordinate of the ending point.

A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.

Instance memberClearRect(rect)​

Clears the specified pixels within a given rectangle.

ParameterTypeDescription
rectRectangleRectangle's coordinates and size.

Instance memberClearRect(x, y, width, height)​

Clears the specified pixels within a given rectangle.

ParameterTypeDescription
xInt32The x-coordinate of the upper-left corner of the rectangle.
yInt32The y-coordinate of the upper-left corner of the rectangle.
widthInt32The width of the rectangle, in pixels.
heightInt32The height of the rectangle, in pixels.

Instance memberClip()​

Clips a region of any shape and size from the original canvas.

Once a region is clipped, all future drawing will be limited to the clipped region (no access to other regions on the canvas). You can however save the current canvas region using the save() method before using the clip() method, and restore it (with the restore() method) any time in the future.

Instance memberClosePath()​

Creates a path from the current point back to the starting point.

Instance memberCreateLinearGradient(x0, y0, x1, y1, colorStops)​

Creates a linear gradient object. The gradient can be used to fill rectangles, circles, lines, text, etc.

ParameterTypeDescription
x0Int32The x-coordinate of the start point of the gradient.
y0Int32The y-coordinate of the start point of the gradient.
x1Int32The x-coordinate of the end point of the gradient.
y1Int32The y-coordinate of the end point of the gradient.
colorStopsObject[]Array of color stops. Each element must define a stop value between 0.0 and 1.0 and a color value.

Returns: Object.

Instance memberCreatePattern(image, repeat)​

Repeats the specified element in the specified direction. The repeated element can be used to draw/fill rectangles, circles, lines etc.

ParameterTypeDescription
imageImageSpecifies the image of the pattern to use.
repeatCanvasRepeatPatternSpecifies the repeat pattern.

Returns: Object.

Instance memberCreatePattern(imageSource, repeat)​

Repeats the specified element in the specified direction. The repeated element can be used to draw/fill rectangles, circles, lines etc.

ParameterTypeDescription
imageSourceStringSpecifies the source of the image of the pattern to use.
repeatCanvasRepeatPatternSpecifies the repeat pattern.

Returns: Object.

Instance memberCreateRadialGradient(x0, y0, r0, x1, y1, r1, colorStops)​

Creates a linear gradient object. The gradient can be used to fill rectangles, circles, lines, text, etc.

ParameterTypeDescription
x0Int32The x-coordinate of the start point of the gradient.
y0Int32The y-coordinate of the start point of the gradient.
r0SingleThe radius of the starting circle.
x1Int32The x-coordinate of the end point of the gradient.
y1Int32The y-coordinate of the end point of the gradient.
r1SingleThe radius of the ending circle.
colorStopsObject[]Array of color stops. Each element must define a stop value between 0.0 and 1.0 and a color value.

Returns: Object.

Instance memberDrawImage(image, x, y)​

Draws an image onto the canvas.

ParameterTypeDescription
imageImageSpecifies the image to draw.
xInt32The x-coordinate where to place the image on the canvas.
yInt32The y-coordinate where to place the image on the canvas.

Instance memberDrawImage(image, location)​

Draws an image onto the canvas.

ParameterTypeDescription
imageImageSpecifies the image to draw.
locationPointThe x-coordinate and y-coordinate where to place the image on the canvas.

Instance memberDrawImage(image, x, y, width, height)​

Draws an image onto the canvas.

ParameterTypeDescription
imageImageSpecifies the image to draw.
xInt32The x-coordinate where to place the image on the canvas.
yInt32The y-coordinate where to place the image on the canvas.
widthInt32The width of the image to use (stretch or reduce the image).
heightInt32The height of the image to use (stretch or reduce the image).

Instance memberDrawImage(image, rect)​

Draws an image onto the canvas.

ParameterTypeDescription
imageImageSpecifies the image to draw.
rectRectangleThe coordinates and size of the image to place on the canvas.

Instance memberDrawImage(image, clipX, clipY, clipWidth, clipHeight, x, y, width, height)​

Draws an image onto the canvas.

ParameterTypeDescription
imageImageSpecifies the image to draw.
clipXInt32The x-coordinate where to start clipping.
clipYInt32The y-coordinate where to start clipping.
clipWidthInt32The width of the clipped image.
clipHeightInt32The height of the clipped image.
xInt32The x coordinate where to place the image on the canvas.
yInt32The y coordinate where to place the image on the canvas.
widthInt32The width of the image to use (stretch or reduce the image).
heightInt32The height of the image to use (stretch or reduce the image).

Instance memberDrawImage(image, clipRect, imageRect)​

Draws an image onto the canvas.

ParameterTypeDescription
imageImageSpecifies the image to draw.
clipRectRectangleThe clip rectangle.
imageRectRectangleThe size and location of the image to place on the canvas.

Instance memberDrawImage(imageSource, x, y)​

Draws an image onto the canvas.

ParameterTypeDescription
imageSourceStringSpecifies the image to draw.
xInt32The x-coordinate where to place the image on the canvas.
yInt32The y-coordinate where to place the image on the canvas.

Instance memberDrawImage(imageSource, location)​

Draws an image onto the canvas.

ParameterTypeDescription
imageSourceStringSpecifies the image to draw.
locationPointThe x-coordinate and y-coordinate where to place the image on the canvas.

Instance memberDrawImage(imageSource, x, y, width, height)​

Draws an image onto the canvas.

ParameterTypeDescription
imageSourceStringSpecifies the image to draw.
xInt32The x coordinate where to place the image on the canvas.
yInt32The y coordinate where to place the image on the canvas.
widthInt32The width of the image to use (stretch or reduce the image).
heightInt32The height of the image to use (stretch or reduce the image).

Instance memberDrawImage(imageSource, rect)​

Draws an image onto the canvas.

ParameterTypeDescription
imageSourceStringSpecifies the image to draw.
rectRectangleThe coordinates and size of the image to place on the canvas.

Instance memberDrawImage(imageSource, clipX, clipY, clipWidth, clipHeight, x, y, width, height)​

Draws an image onto the canvas.

ParameterTypeDescription
imageSourceStringSpecifies the image to draw.
clipXInt32The x coordinate where to start clipping.
clipYInt32The y coordinate where to start clipping.
clipWidthInt32The width of the clipped image.
clipHeightInt32The height of the clipped image.
xInt32The x coordinate where to place the image on the canvas.
yInt32The y coordinate where to place the image on the canvas.
widthInt32The width of the image to use (stretch or reduce the image).
heightInt32The height of the image to use (stretch or reduce the image).

Instance memberDrawImage(imageSource, clipRect, imageRect)​

Draws an image onto the canvas.

ParameterTypeDescription
imageSourceStringSpecifies the image to draw.
clipRectRectangleThe clip rectangle.
imageRectRectangleThe size and location of the image to place on the canvas.

Instance memberFill()​

Fills the current drawing (path.)

Instance memberFillRect(rect)​

Draws a "filled" rectangle. The default color of the fill is black.

ParameterTypeDescription
rectRectangleRectangle's coordinates and size.

Instance memberFillRect(x, y, width, height)​

Draws a "filled" rectangle. The default color of the fill is black.

ParameterTypeDescription
xInt32The x-coordinate of the upper-left corner of the rectangle.
yInt32The y-coordinate of the upper-left corner of the rectangle.
widthInt32The width of the rectangle, in pixels.
heightInt32The height of the rectangle, in pixels.

Instance memberFillText(text, x, y)​

Draws filled text on the canvas. The default color of the text is black.

ParameterTypeDescription
textStringSpecifies the text that will be written on the canvas.
xInt32The x-coordinate where to start painting the text (relative to the canvas).
yInt32The y-coordinate where to start painting the text (relative to the canvas)

Instance memberFillText(text, location)​

Draws filled text on the canvas. The default color of the text is black.

ParameterTypeDescription
textStringSpecifies the text that will be written on the canvas.
locationPointThe x-coordinate and y-coordinate where to start painting the text (relative to the canvas).

Instance memberGetLineDash()​

Returns the current line dash pattern.

Returns: Int32[]. A list of numbers that specifies distances to alternately draw a line and a gap (in coordinate space units).

Instance memberLineTo(x, y)​

Adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).

ParameterTypeDescription
xInt32The x-coordinate of where to create the line to.
yInt32The y-coordinate of where to create the line to.

Instance memberLineTo(location)​

Adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).

ParameterTypeDescription
locationPointThe x-coordinate and y-coordinate of where to create the line to.

Instance memberMoveTo(x, y)​

Moves the path to the specified point in the canvas, without creating a line.

ParameterTypeDescription
xInt32The x-coordinate of where to move the path to.
yInt32The y-coordinate of where to move the path to.

Use the stroke() method to actually draw the path on the canvas.

Instance memberMoveTo(location)​

Moves the path to the specified point in the canvas, without creating a line.

ParameterTypeDescription
locationPointThe x-coordinate and y-coordinate of where to move the path to.

Use the stroke() method to actually draw the path on the canvas.

Instance memberQuadraticCurveTo(cpx, cpy, x, y)​

Adds a point to the current path by using the specified control points that represent a quadratic Bézier curve.

ParameterTypeDescription
cpxInt32The x-coordinate of the Bézier control point.
cpyInt32The y-coordinate of the Bézier control point.
xInt32The x-coordinate of the ending point.
yInt32The y-coordinate of the ending point.

A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.

Instance memberRect(rect)​

Creates a rectangle.

ParameterTypeDescription
rectRectangleRectangle's coordinates and size.

Instance memberRect(x, y, width, height)​

Creates a rectangle.

ParameterTypeDescription
xInt32The x-coordinate of the upper-left corner of the rectangle.
yInt32The y-coordinate of the upper-left corner of the rectangle.
widthInt32The width of the rectangle, in pixels.
heightInt32The height of the rectangle, in pixels.

Instance memberRestore()​

Returns previously saved path state and attributes.

Instance memberRotate(degrees)​

Method rotates the current drawing.

ParameterTypeDescription
degreesSingleThe rotation angle, in degrees.

The rotation will only affect drawings made AFTER the rotation is done.

Instance memberSave()​

Saves the state of the current context.

Instance memberScale(scaleWidth, scaleHeight)​

Scales the current drawing, bigger or smaller.

ParameterTypeDescription
scaleWidthSingleScales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)
scaleHeightSingleScales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)

Instance memberScale(scale)​

Scales the current drawing, bigger or smaller.

ParameterTypeDescription
scaleSizeFScales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)

Instance memberSetLineDash(segments)​

Sets the line dash pattern.

ParameterTypeDescription
segmentsInt32[]A list of numbers that specifies distances to alternately draw a line and a gap (in coordinate space units). If the number of elements in the array is odd, the elements of the array get copied and concatenated. For example, [5, 15, 25] will become [5, 15, 25, 5, 15, 25].

Instance memberSetTransform(scaleWidth, skewHoriz, skewVert, scaleHeight, x, y)​

Resets the current transform to the identity matrix, and then runs transform() with the same arguments.

ParameterTypeDescription
scaleWidthSingleScales the drawing horizontally.
skewHorizSingleSkew the drawing horizontally.
skewVertSingleSkew the drawing vertically.
scaleHeightSingleScales the drawing vertically.
xInt32Moves the drawing horizontally
yInt32Moves the drawing vertically.

The transformation will only affect drawings made after the transform() method is called. The transform() method behaves relatively to other transformations made by rotate(), scale(), translate(), or transform(). Example: If you already have set your drawing to scale by two, and the transform() method scales your drawings by two, your drawings will now scale by four.

Instance memberStroke()​

Draws the path you have defined.

Instance memberStrokeRect(rect)​

Draws a rectangle (no fill). The default color of the stroke is black.

ParameterTypeDescription
rectRectangleRectangle's coordinates and size.

Instance memberStrokeRect(x, y, width, height)​

Draws a rectangle (no fill). The default color of the stroke is black.

ParameterTypeDescription
xInt32The x-coordinate of the upper-left corner of the rectangle.
yInt32The y-coordinate of the upper-left corner of the rectangle.
widthInt32The width of the rectangle, in pixels.
heightInt32The height of the rectangle, in pixels.

Instance memberStrokeText(text, x, y)​

Draws text (with no fill) on the canvas. The default color of the text is black.

ParameterTypeDescription
textStringSpecifies the text that will be written on the canvas.
xInt32The x-coordinate where to start painting the text (relative to the canvas).
yInt32The y-coordinate where to start painting the text (relative to the canvas)

Instance memberStrokeText(text, location)​

Draws text (with no fill) on the canvas. The default color of the text is black.

ParameterTypeDescription
textStringSpecifies the text that will be written on the canvas.
locationPointThe x-coordinate and y-coordinate where to start painting the text (relative to the canvas).

Instance memberTransform(scaleWidth, skewHoriz, skewVert, scaleHeight, x, y)​

Replaces the current transformation matrix.

ParameterTypeDescription
scaleWidthSingleScales the drawing horizontally.
skewHorizSingleSkew the drawing horizontally.
skewVertSingleSkew the drawing vertically.
scaleHeightSingleScales the drawing vertically.
xInt32Moves the drawing horizontally
yInt32Moves the drawing vertically.

The transformation will only affect drawings made after the transform() method is called. The transform() method behaves relatively to other transformations made by rotate(), scale(), translate(), or transform(). Example: If you already have set your drawing to scale by two, and the transform() method scales your drawings by two, your drawings will now scale by four.

Instance memberTranslate(x, y)​

Remaps the (0,0) position on the canvas.

ParameterTypeDescription
xInt32The value to add to horizontal (x) coordinates.
yInt32The value to add to vertical (y) coordinates.

When you call a method such as fillRect() after translate(), the value is added to the x- and y-coordinate values.

Instance memberTranslate(location)​

Remaps the (0,0) position on the canvas.

ParameterTypeDescription
locationPointThe value to add to horizontal (x) and vertical (y) coordinates.

When you call a method such as fillRect() after translate(), the value is added to the x- and y-coordinate values.

Events​

Instance memberRedraw​

EventHandler Fired when the canvas requires a full redraw.

Inherited​

Properties​

NameDescriptionFrom
AnchorReturns or sets the edges of the container to which a control is bound and determines how a control is resized with its parent.Control
AnonymousReturns or sets whether the control receives pointer events. Anonymous controls let pointer events bubble to their parents.Control
AppearanceKeySets the appearance key for the theme engine.Control
BecomingActiveControlReturns a flag indicating that the control is becoming the active control.Control
BindingContextReturns or sets the BindingContext for the control.Control
BottomReturns the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.Control
BoundsReturns or sets the size and location of the control including its non-client area, in pixels and relative to the parent control.Control
CanExecuteDetermines whether the control can execute a command.Control
CanFocusReturns whether the control can receive focus.Control
CanSelectReturns whether the control can be selected.Control
CaptureReturns or sets whether the control has captured the mouse.Control
ClientEventsReturns a collection of client events and JavaScript listeners. You may attach multiple listeners to same event.Control
ClientRectangleReturns the client rectangle of the control.Control
ClientSizeReturns or sets the height and width of the client area.Control
ContainsFocusIndicates whether the control, or one of its child controls, has the input focus.Control
ContextMenuReturns or sets the shortcut menu associated with the control.Control
ControlsReturns the collection of controls contained within the control.Control
CreatedReturns a value indicating whether the control has been created.Control
CssClassReturns or sets additional CSS class names to add to the widget.Control
CssStyleReturns or sets the custom CSS styles to add to the widget.Control
CursorReturns or sets the cursor that is displayed when the mouse pointer is over the control.Control
DataBindingsReturns the data bindings for the control.Control
DisplayRectangleReturns the rectangle that represents the virtual display area of the control.Control
DisposingReturns whether the control is in the process of disposing itself and child controls.Control
DockReturns or sets which control borders are docked to its parent control and determines how a control is resized with its parent.Control
EnableNativeContextMenuEnables or disables the browser's context menu.Control
FocusedReturns a value indicating whether the control has input focus.Control
HandleReturns the unique server-side id (handle) for this component.Control
HasChildrenReturns whether the control contains any child control.Control
HasDataBindingsReturns whether the control specifies data bindings.Control
HasResponsiveProfilesCheck if the control defines any responsive profile without forcing the creation of the collection.Control
HasUserDataChecks if the UserData dynamic object was created and has any value.Control
HeightReturns or sets the height of the control.Control
InitScriptReturns or sets an initialization script to execute when the widget is created (or reloaded) in the browser.Control
IsDisposedReturns whether the control has been disposed.Control
IsHandleCreatedReturns if the control has a server-side component id (handle) associated with it.Control
IsMirroredReturns whether the control is mirrored.Control
LayoutEngineReturns the control's layout engine.Control
LeftReturns or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area.Control
LocationReturns or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.Control
MarginReturns or sets the space between controls.Control
MaximumSizeReturns or sets the maximum size for the control.Control
MinimumSizeReturns or sets the minimum size for the control.Control
MovableReturns or sets whether the control can be moved by dragging.Control
NameGets or sets the name of the control.Control
PaddingReturns or sets padding within the control.Control
ParentReturns or sets the parent container of the control.Control
PreferredSizeReturns the preferred size in which the control can fit.Control
ResizableEdgesReturns or sets the edges of the control that can be dragged to resize the control.Control
ResponsiveProfilesReturns the collection of responsive properties that have been set for this control.Control
RightReturn the distance, in pixels, between the right edge of the control and the left edge of its container's client area.Control
SelectableReturns or sets whether the text in the control can be selected in the browser by the user by dragging the pointer.
Since 2.5.22
Control
ShowLoaderReturns or sets whether the control is blocked by the ajax loader.Control
SizeReturns or sets the height and width of the control.Control
StatesReturns or sets additional theme states to the client widget.Control
TagReturns or sets the object that contains data about the control.Control
ToolTipTextReturns or sets the tooltip text to show for this control.Control
TopReturns or sets the distance, in pixels, between the top edge of the control and the top edge of its container's client area.Control
TopLevelControlReturns the parent control that is not parented by another Form. Typically, this is the outermost Form that the control is contained in.Control
UserDataReturns a dynamic object that can be used to store custom data in relation to this control.Control
UseWaitCursorReturns or sets whether to use the wait cursor for the current control and all child controls.Control
ValidationCancelledReturns a flag indicating that the validation has been canceled.Control
VisibleReturns or sets whether the control and all its child controls are displayed.Control
WidthReturns or sets the width of the control.Control

Methods​

NameDescriptionFrom
AddClientEventListener(name, script)Adds a new listener script to the event name to the client widget.Control
AddCssClass(name)Adds the CSS class name to the widget element. If the class already exists in the CssClass it's not added.Control
AddState(state)Adds the specified theme state to the widget.Control
BeginInvoke(method)Executes the specified delegate asynchronously.Control
BeginInvoke(method, args)Executes the specified delegate asynchronously.Control
BringToFront()Brings the control to the front of the z-order.Control
Call(function, args)Runs the JavaScript function within the component's context in the browser.Control
Call(function, callback, args)Runs the JavaScript function within the component's context in the browser and returns the value to the callback method.Control
CallAsync(function, args)Asynchronously runs the JavaScript function within the component's context in the browser and returns an awaitable Task containing the value returned by the remote call.Control
CenterToParent()Centers the position of the control within the bounds of the parent.Control
CenterToParent(horizontal, vertical)Centers the position of the control within the bounds of the parent either horizontally, vertically or both.Control
Contains(control)Indicates whether the specified control is a child of this control.Control
CreateControl()Creates and register this control and all its children.Control
DoDragDrop(data, allowedEffects)Begins a drag-and-drop operation.Control
DoDragDrop(data, allowedEffects, imageSource)Begins a drag-and-drop operation.Control
DoDragDrop(data, allowedEffects, imageSource, imageSize)Begins a drag-and-drop operation.Control
DoDragDrop(data, allowedEffects, image)Begins a drag-and-drop operation.Control
DoDragDrop(data, allowedEffects, image, imageSize)Begins a drag-and-drop operation.Control
EndInvoke(asyncResult)Retrieves the return value from the asynchronous operation represented by asyncResult .Control
Eval(javaScript)Runs the javaScript code within the component's context in the browser.Control
Eval(javaScript, callback)Runs the javaScript code within the component's context in the browser and returns the value to the callback method.Control
EvalAsync(javaScript)Asynchronously runs the javaScript code within the component's context in the browser and returns an awaitable Task that contains the value returned by the remote call.Control
FindForm()Retrieves the form that the control is on.Control
FindPage()Retrieves the page that the control is on.Control
Focus()Sets input focus to the control.Control
GetChildAtPoint(pt, skipValue)Retrieves the child control that is located at the specified coordinates, specifying whether to ignore child controls of a certain type.Control
GetChildAtPoint(pt)Retrieves the child control that is located at the specified coordinates.Control
GetClientEventListener(id)Returns the script associated to the listener identified by id .Control
GetClientEventListener(name)Returns the scripts for all the listeners attached to the event name .Control
GetContainerControl()Returns the next IContainerControl up the control's chain of parents.Control
GetNextControl(control, forward)Retrieves the next control forward or back in the tab order of child controls.Control
GetStyle(flag)Retrieves the value of the specified control style bit for the control.Control
HasClientEventListener(name)Checks whether the specified event name has any listener attached.Control
HasCssClass(name)Returns true if the property CssClass contains the specified class name .Control
HasState(state)Checks whether the specified theme state is present in the States property.Control
Hide()Conceals the control from the user.Control
Invalidate()Causes the control to update the client side widget. When in design mode, causes the rendered control to update its entire surface in the designer.Control
Invalidate(invalidateChildren)Causes the control to update the client side widget. When in design mode, causes the rendered control to update its entire surface in the designer.Control
Invoke(method)Executes the specified delegate.Control
Invoke(method, args)Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments.Control
LayoutChildren(dock, spacing, useMargins, hAlign, vAlign)Arranges all the child Control using the specified dock style, spaced by spacing pixels.Control
LayoutChildren(dock, viewArea, spacing, useMargins, hAlign, vAlign)Arranges all the child Control using the specified dock style, spaced by spacing pixels.Control
LayoutChildren(controls, dock, spacing, useMargins, hAlign, vAlign)Arranges all the child Control using the specified dock style, spaced by spacing pixels.Control
LayoutChildren(controls, dock, viewArea, spacing, useMargins, hAlign, vAlign)Arranges all the child Control using the specified dock style, spaced by spacing pixels.Control
LayoutChildren(direction, spacing, useMargins, hAlign, vAlign)Arranges all the child Control in the specified direction , spaced by spacing pixels.Control
LayoutChildren(direction, viewArea, spacing, useMargins, hAlign, vAlign)Arranges all the child Control in the specified direction , spaced by spacing pixels, and constrained within the specified viewArea .Control
LayoutChildren(controls, direction, spacing, useMargins, hAlign, vAlign)Arranges the specified child controls in the specified direction , spaced by spacing pixels.Control
LayoutChildren(controls, direction, viewArea, spacing, useMargins, hAlign, vAlign)Arranges the specified child controls in the specified direction , spaced by spacing pixels, and constrained within the specified viewArea .Control
PerformLayout()Forces the control to apply layout logic to all its child controls.Control
PerformLayout(affectedControl, affectedProperty)Forces the control to apply layout logic to all its child controls.Control
PointToClient(point)Computes the location of the specified screen point into client coordinates.Control
PointToScreen(point)Computes the location of the specified client point into screen coordinates.Control
RectangleToClient(rect)Computes the size and location of the specified screen rectangle in client coordinates.Control
RectangleToScreen(rect)Computes the size and location of the specified client rectangle in screen coordinates.Control
Refresh()Forces the control to update corresponding client widget. When in DesignMode it forces a full redraw of the designer surface for this control, including the non-client areas such as the caption of forms or panels.Control
Refresh(refreshChildren)Forces the control to update corresponding client widget. When in DesignMode it forces a full redraw of the designer surface for this control and optionally of its children, including the non-client areas such as the caption of forms or panels.Control
RemoveClientEventListener(id)Detaches and removes the listener identified by id .Control
RemoveClientEventListener(name)Removes all the listeners attached to the event name .Control
RemoveCssClass(name)Removes the specified css class name from the control's CssClass property.Control
RemoveState(state)Removes the specified theme state from the widget.Control
ResetBindings()Removes all the data bindings from the control.Control
ResumeLayout()Resumes layout logic.Control
ResumeLayout(performLayout)Resumes layout logic, optionally forcing an immediate layout of all pending layout requests.Control
ScrollControlIntoView(alignX, alignY)Scrolls the control into view in the container using the specified alignX and alignY preferences.Control
ScrollControlIntoView()Scrolls the child control into view.Control
Select()Activates a control.Control
SelectNextControl(control, forward, tabStopOnly, nested, wrap)Activates the next control in the list according to the specified selection rules.Control
SendToBack()Sends the control to the back of the z-order.Control
SetBounds(x, y, width, height)Sets the bounds of the control to the specified location and size.Control
SetBounds(x, y, width, height, specified)Sets the specified bounds of the control to the specified location and size.Control
Show()Displays the control to the user.Control
SuspendLayout()Suspends the layout logic for the control.Control
Update()Causes the control to update the corresponding client side widget. When in design mode, causes the rendered control to update its entire surface in the designer.Control
ValidateChildren(flags)Validates all the child controls in the container. Exactly which controls are validated and which controls are skipped is determined by flags .Control
ValidateChildren()Validates all selectable child controls in the container, including descendants. This is equivalent to calling ValidateChildren(ValidationConstraints.Selectable). See Selectable for details of exactly which child controls will be validated.Control

Events​

NameDescriptionFrom
AppearFired after the control has been fully rendered on the client.Control
BecomingActiveControlChangedFired when the value of the BecomingActiveControl property changes.Control
BindingContextChangedOccurs when the value of the BindingContext property changes.Control
ClickFired when the control is clicked.Control
ClientSizeChangedFired when the ClientSize property value changes.Control
ContextMenuChangedFired when the value of the ContextMenu property changes.Control
ControlAddedFired when a new control is added to the ControlCollection.Control
ControlCreatedFired when a control is made visible the first time, fully created and sent to the client.Control
ControlRemovedFired when a control is removed from the ControlCollection.Control
CursorChangedFired when the value of the Cursor property changes.Control
DisappearFired after the control is no longer visible on the client.Control
DisposedFired when the component is disposed.Control
DockChangedFired when the value of the Dock property changes.Control
DoubleClickFired when the control is double-clicked.Control
DragDropFired when a drag-and-drop operation is completed.Control
DragEndFired when a drag-drop operation is terminated either by a drop or canceled.Control
DragEnterFired when an object is dragged into the control's bounds.Control
DragLeaveFired when an object is dragged out of the control's bounds.Control
DragOverFired when an object is dragged over the control's bounds.Control
DragStartFired when a drag-drop operation is started by the user.Control
EnabledChangedFired when the Enabled property value has changed.Control
EndMoveFired when a control is Movable and the user ends the move operation.Control
EndResizeFired when a control has ResizableEdges and the user ends the resize operation.Control
GotFocusFired when the control gains the focus.Control
HelpRequestedFired when the user requests help for a control by pressing F1.Control
LayoutFired when a control should reposition its child controls.Control
LocationChangedFired when the Location property value has changed.Control
LongTapFired when a pointer holds on the screen.Control
LostFocusFired when the control loses focus.Control
MarginChangedFired when the control's margin changes.Control
MouseCaptureChangedFired when the control loses mouse capture.Control
MouseClickFired when the control is clicked by the mouse.Control
MouseDoubleClickFired when the control is double clicked by the mouse.Control
MouseDownFired when the mouse pointer is over the control and a mouse button is pressed.Control
MouseEnterFired when the mouse pointer enters the control.Control
MouseHoverFired when the mouse pointer rests on the control.Control
MouseLeaveFired when the mouse pointer leaves the control.Control
MouseMoveFired when the mouse pointer is moved over the control.Control
MouseUpFired when the mouse pointer is over the control and a mouse button is released.Control
MouseWheelFired when the mouse wheel moves while the control has focus.Control
PaddingChangedFired when the control's padding changes.Control
PaintFired when a UserPaint control needs to redraw itself.Control
ParentChangedFired when the Parent property value changes.Control
PinchFired when two finger moved towards or away from each other. It contains the scaling factor of the pinch.Control
PreviewKeyDownFired before the KeyDown event when a key is pressed while focus is on this control.Control
QueryContinueDragOccurs during a drag-and-drop operation and enables the drag source to determine whether the drag-and-drop operation should be canceled.Control
ResizeFired when the control is resized.Control
ResponsiveProfileChangedFired when the active responsive profile is changed.Control
RotateFired when two finger moved around a single point. It contains the angle of the rotation.Control
SizeChangedFired when the Size property value changes.Control
StartMoveFired when a control is Movable and the user begins the move operation.Control
StartResizeFired when a control has ResizableEdges and the user begins the resize operation.Control
StyleChangedFired when the control style changed.Control
SwipeFired when a pointer swipes over the screen.Control
TapFired when a pointer taps on the screen.Control
TouchCancelFired when a touch point has been disrupted in an implementation-specific manner (for example, too many touch points are created).Control
TouchEndFired when a touch point is removed from the touch surface.Control
TouchMoveFired when a touch point is moved along the touch surface.Control
TouchStartFired when a touch point is placed on the touch surface.Control
TrackFired when a pointer grabs an item and moves the pointer on it.Control
VisibleChangedFired when the Visible property value changes.Control
WidgetEventFired when the control receives a custom event from the client.Control

Extension Methods​

NameDescriptionFrom
Beep(Target, AudioBase64)Sounds a tone through the computer's speaker.Interaction
InputBox(Target, Prompt, Title, DefaultResponse, XPos, YPos, CloseCallback)Displays a prompt in a dialog box, waits for the user to input text or click a button, and then returns a string containing the contents of the text box.Interaction
InputBoxAsync(Target, Prompt, Title, DefaultResponse, XPos, YPos)Asynchronous displays a prompt in a dialog box, waits for the user to input text or click a button, and then returns a string containing the contents of the text box.Interaction
MsgBox(Target, Prompt, Buttons, Title, CloseCallback)Displays a message in a dialog box, waits for the user to click a button, and then returns an integer indicating which button the user clicked.Interaction
MsgBoxAsync(Target, Prompt, Buttons, Title)Asynchronously displays a message in a dialog box, waits for the user to click a button, and then returns an integer indicating which button the user clicked.Interaction
ToJSON(obj, formatted)Serializes the object to a JSON string.JSON
ToJSON(obj, options)Serializes the object to a JSON string.JSON

Implements​

NameDescription
IBindableComponentBindable components implement this interface.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejHandlerRepresents a Wisej component that is capable of handling postback requests from the client.
IWisejSerializableAllows an object to serialize itself.