Blazorise Signature Pad API
Explore the Blazorise Signature Pad API reference for parameters, events, methods, and related types.
For examples and usage guidance, see the Signature Pad documentation.
API
Parameters
| Parameter | Description | Type | Default |
|---|---|---|---|
AriaLabelledBy |
Specifies the aria-labelledby attribute value. |
string | |
BackgroundColor |
The color used to define the background color of the signature pad. Can be any color format; including HEX, or rgb. |
string | |
CanvasHeight |
Specifies the height, in pixels, of the underline canvas element. |
int? | null |
CanvasWidth |
Specifies the width, in pixels, of the underline canvas element. |
int? | null |
DotSize |
The radius of a single dot. Also the width of the start of a mark. |
double | 0 |
ImageQuality |
The encoder options for image type [png, jpeg] to get from the canvas element. Accepted range is from 0 to 1, where 1 means best quality. |
double? | null |
ImageType |
The image type [png, jpeg, svg] to get from the canvas element. Possible values: |
SignaturePadImageType | SignaturePadImageType.Png |
IncludeImageBackgroundColor |
If true, the [svg] image returned from the canvas will include background color defined by the BackgroundColor parameter. |
bool | false |
MaxLineWidth |
The maximum width of a line. |
double | 0 |
MinDistance |
Add the next point only if the previous one is farther than 'n' pixels. Defaults to 5. |
int | 0 |
MinLineWidth |
The minimum width of a line. |
double | 0 |
PenColor |
The color used to define the lines color of the signature pad. Can be any color format; including HEX, or rgb. |
string | |
ReadOnly |
If true, prevents the user interaction. |
bool | false |
TabIndex |
If defined, indicates that its element can be focused and can participates in sequential keyboard navigation. |
int? | null |
Throttle |
The time in milliseconds to throttle drawing. Set to 0 to turn off throttling. |
int | 0 |
Value |
Gets or sets value for the signature pad. |
byte[] | null |
VelocityFilterWeight |
The weight used to modify new velocity based on the previous velocity. |
double | 0 |
Events
| Event | Description | Type |
|---|---|---|
BeginStroke |
Defines the event that is triggered when a new stroke begins on the signature pad. The event provides information about the starting point of the stroke. |
EventCallback<SignaturePadBeginStrokeEventArgs> |
EndStroke |
Defines the event that is triggered when a stroke ends on the signature pad. The event provides the signature pad's current image data as a Data URL. |
EventCallback<SignaturePadEndStrokeEventArgs> |
ValueChanged |
Defines the event that is triggered when the signature pad value changes. The event provides the new signature as a byte array. |
EventCallback<byte[]> |
Methods
| Method | Description | Return | Parameters |
|---|---|---|---|
Clear |
Clears the content of a signature canvas. | Task | |
GetDataUrl |
Gets the data url based on the image type and the data array. | string | byte[] data, SignaturePadImageType imageType |
Undo |
Undos the last stroke if there is any. | Task |